How can I do a query for this report in sql server? -


i have tables "cashmovementtbl","salestbl" & "expensestbl" include data that:

enter image description here

and want show data such following:

enter image description here

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 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -