Click here to Skip to main content
15,918,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
SQL
SELECT [CaseLeadID]
     ,[Call1Date]
     ,[Call1Notes]
     ,[Call2Date]
     ,[Call2Notes]
     ,[Call3Date]
     ,[Call3Notes]
     ,[Call1Date]
     ,[Call1Notes]
     ,[Call2Date]
     ,[Call2Notes]
     ,[Call3Date]
     ,[Call3Notes]
 FROM tblCallCenterCalls 

For the above query the output will be in horizontal
But i need output like this
SQL
CaseLeadID  CallType   CallDate     CallNote
1           Call1      02/02/2012     2
1           Call2      02/02/2012     2
3           Call1      02/02/2012     5
3           Call2      02/02/2012     5
3           Call3      02/02/2012     5

Post Solution for this
Thanks In advance
Posted
Updated 5-Sep-12 2:27am
v2

Hi,

you can achieve this things using the pivot.

See the below link. Here is the example. So using that you can achieve desired things.

http://forums.asp.net/t/1775130.aspx/1[^]

Thanks,
Viprat
 
Share this answer
 
Comments
rajrprk 5-Sep-12 8:32am    
Can you able to respond with simple solution
VIPR@T 5-Sep-12 8:48am    
I have found this solution. I think its simple.... just try to understand..
 
Share this answer
 
v2
Comments
Prasad_Kulkarni 5-Sep-12 8:24am    
5'ed
__TR__ 5-Sep-12 8:31am    
Thanks Prasad :)

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