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

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query

Author  Topic 

kid_on_the_block
Posting Yak Master

172 Posts

Posted - 2006-02-22 : 03:27:59
The following is my table structure :-

Emp ID
Jan-Ac
Jan-Ac-P
Jan-Abs
Jan-Ef
Jan-Ef-P
Feb-Ac
Feb-Ac-P
Feb-Abs
Feb-Ef
Feb-Ef-P
MAR-Ac
Mar-Ac-P
MAR-Abs
MAR-Ef
Mar-Ef-P
....

I want to have a view that would be

Emp_Code
Points
Jan
Feb
Mar
April
....


e.g. of the output

Emp_Code Points Jan Feb Mar April
----------------------------------------------------
001 AC 10 20 30 40
001 AC-P 20 30 40 50
001 Abs 10 20 50 60


So its just vertical of what it was horizontal before

Please help !!!!!!



Norwich
Posting Yak Master

158 Posts

Posted - 2006-02-22 : 05:46:19
Check out this link:
[url]http://www.sqlteam.com/item.asp?ItemID=2955[/url]

Regards
N

The revolution won't be televised!
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-22 : 07:02:24
Also refer
http://weblogs.sqlteam.com/jeffs/archive/2005/05.aspx

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -