I think what you are describing would be the results if you used a
LEFT OUTER JOIN
instead of the
INNER JOIN
s that you currently have.
Have a look at these CodeProject articles to explain further
Visual Representation of SQL Joins[
^]
Types of Join in SQL Server[
^]
Not a lot of change to make...
select distinct SJ.SJID, i1.itemnm as itemnmsou, SJ.SJqty, SJ.SJPCS, SJ.SJRate, SJ.SJamt, SJ.SJleft, SJ.SJDate, SJ.nrr,
i2.itemnm as itemnmDES, SJD.SJDqty, SJD.SJDPCS, SJD.SJDRate, SJD.SJDamt, SJD.SJDstock, SJD.SJDdate
from tbl_Stock_Journal SJ
LEFT OUTER JOIN tbl_item AS i1 ON i1.itemid =SJ.SJItmID
LEFT OUTER JOIN tbl_Stock_Journal_Details AS SJD ON SJ.SJID = SJD.SJID
LEFT OUTER JOIN tbl_item AS i2 ON i2.itemid =SJd.SJdItmID
where CAST(sj.SJDate AS DATE) BETWEEN @Sdate AND @EDate