Click here to Skip to main content
16,006,475 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi.. friends

I want following type of output with sql query from tbale tblABC


OUTPUT
======

SrNo. Date BillNo Amount
=================================================
1 10-02-2012 VAT-1 1200.00
2 RET-4 50.00
3 RET-5 150.50
4 11-02-2012 VAT-2 1500.00
5 RET-6 2505.00
6 12-02-2012 VAT-3 05.00


from table which has following data


tblABC
======

SrNo. Date BillNo Amount
=================================================
1 10-02-2012 VAT-1 1200.00
2 10-02-2012 RET-4 50.00
3 10-02-2012 RET-5 150.50
4 11-02-2012 VAT-2 1500.00
5 11-02-2012 RET-6 2505.00
6 12-02-2012 VAT-3 05.00


The diffrence between the OUTPUT i want and table is that in
OUTPUT i don't want Date Reptetion as it is in table.

Please help how could i have it.
Posted
Updated 29-Feb-12 0:58am
v2

1 solution

You can use the PIVOT command to build a table - see here[^].
This[^] is another example.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900