January 20, 2012 at 3:26 am
Hi,
I want to convert Single Column values to Row.
Table Original Content:
Code Amount Expenditure
10027 5000.00LOCAL CONVEYANCE
10027 320.00LOCAL CONVEYANCE
10116 1589.00TRAVEL EXPENSES
10095 350.00LOCAL CONVEYANCE
10095 1215.00TRAVEL EXPENSES
Expected Output :
CodeLCTE
100275000.00NULL
10027320.00NULL
10116NULL1589.00
10095350.001215.00
Thanks in Advance
January 20, 2012 at 6:25 am
See the following article for how to easily do Crosstabs and Pivots:
http://www.sqlservercentral.com/articles/T-SQL/63681/
See the first link in my signature below if you'd like a coded answer.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply