need cash amount separate and cheque separateYKyesubabu k9yAsked Feb 26, 2017, 11:37 PM766Dear sir, need cash amount separate column cheque amount seperate please help me any one
Gnanavel Sekar9y agoPosted Feb 27, 2017, 8:23 AM1.here can get sum of amount by cheque and cashselect sum(Red_Received_amount),Red_type from Received_Details group by Red_Type2.another wayselect * from Received_Details where Red_type='CASH'select * from Received_Details where Red_type='CHEQUE'
Nitin Sontakke9y agoPosted Feb 27, 2017, 12:23 AMTry following: select Red_iid ,Red_Invoice_no ,case when Red_Type = 'CASH' then Red_received_Amount else 0 end Red_Received_Amount_Cash ,case when Red_Type = 'CHEQUE' then Red_received_Amount else 0 end Red_Received_Amount_Cheque -- Add more columns here...from dbo.Received_Details -- Add where clause here... Hope it helps!
Gnanavel SekarPosted Feb 27, 2017, 8:23 AM
Nitin SontakkePosted Feb 27, 2017, 12:23 AM