views:

30

answers:

1

Hi ,

I have one problem, displaying data in columns.

I have EX: emptable

emp id

1
2
3
4
5
6
7
8
9
10

i want this change in multiple differnt columms, in select query or in store procedure any way

1 2 3 4 5 6 7 8 9 10

Please help in how slove this problem

Thanks Raja

+2  A: 

In SQL 2005 you should be able to use the PIVOT function.

Example: http://geekswithblogs.net/lorint/archive/2006/08/04/87166.aspx

njreed.myopenid.com