Hi,
Check the Script....
SELECT CM.CashDate,
CASE WHEN CM.CashType='IN' THEN S.BillNo ELSE E.ExpnsType END 'Details',
CASE WHEN CM.CashType='IN' THEN CM.Amount ELSE 0.000 END 'In',
CASE WHEN CM.CashType='Out' THEN CM.Amount ELSE 0.000 END 'Out'
FROM CashMovementTbl CM
LEFT OUTER JOIN SalesTbl S ON S.SalesID=CM.SalesID
LEFT OUTER JOIN ExpendesTbl E ON E.ExpnsID=CM.ExpenseID
Regards,
GVPrabu.