Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | 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
 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

3873 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  
 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.06 seconds. Powered By: Snitz Forums 2000