SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Order by
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

JanakiRam
Starting Member

India
22 Posts

Posted - 07/17/2013 :  08:06:29  Show Profile  Reply with Quote
Hi.,

I have a result set like below mentioned

Customer_Ledger_ID Date Payment_Type Payment_Detail_Number Credit Debit
17 07/17/2013 Card XXXX XXXX XXXX 1111 130.00 0
18 07/17/2013 Card XXXX XXXX XXXX 1111 0 130.00
19 07/17/2013 Card XXXX XXXX XXXX 1111 63.17 0
20 07/17/2013 Card XXXX XXXX XXXX 1111 0 63.17

but i need a result set

Customer_Ledger_ID Date Payment_Type Payment_Detail_Number Credit Debit
18 07/17/2013 Card XXXX XXXX XXXX 1111 0 130.00
17 07/17/2013 Card XXXX XXXX XXXX 1111 130.00 0
20 07/17/2013 Card XXXX XXXX XXXX 1111 0 63.17
19 07/17/2013 Card XXXX XXXX XXXX 1111 63.17 0

like this

JanakiRam

James K
Flowing Fount of Yak Knowledge

3704 Posts

Posted - 07/17/2013 :  08:12:16  Show Profile  Reply with Quote
quote:
Originally posted by JanakiRam

Hi.,

I have a result set like below mentioned

Customer_Ledger_ID Date Payment_Type Payment_Detail_Number Credit Debit
17 07/17/2013 Card XXXX XXXX XXXX 1111 130.00 0
18 07/17/2013 Card XXXX XXXX XXXX 1111 0 130.00
19 07/17/2013 Card XXXX XXXX XXXX 1111 63.17 0
20 07/17/2013 Card XXXX XXXX XXXX 1111 0 63.17

but i need a result set

Customer_Ledger_ID Date Payment_Type Payment_Detail_Number Credit Debit
18 07/17/2013 Card XXXX XXXX XXXX 1111 0 130.00
17 07/17/2013 Card XXXX XXXX XXXX 1111 130.00 0
20 07/17/2013 Card XXXX XXXX XXXX 1111 0 63.17
19 07/17/2013 Card XXXX XXXX XXXX 1111 63.17 0

like this

JanakiRam

Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=186890
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000