How can I do a query for this report in sql server? -
i have tables "cashmovementtbl","salestbl" & "expensestbl" include data that:
and want show data such following:
so how can query in sql server show data that.
select c.cashdate, isnull(s.billno,e.expnstype) details, case when c.saleid not null thne c.amount else 0 end [in], case when c.expenseid not null thne c.amount else 0 end [out] cashmovementtbl c left join salestbl s on c.saleid = s.salesis left join expensenstbl e on c.expenseid = e.expnsid