Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««123

How to Write Query for the Below Requirement? Expand / Collapse
Author
Message
Posted Tuesday, September 24, 2013 9:14 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 5, 2014 10:37 AM
Points: 203, Visits: 200

select party_code,sum(inst_amt) as Total_instamt,
sum(case when paid_date < '27/11/2012' then paid_amt else 0 end) as Total_Paidamt
from @table1
group by party_code
Post #1497938
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse