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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 creating temp table from a cursor

Author  Topic 

cez
Starting Member

37 Posts

Posted - 2002-10-24 : 17:41:58
Hi !

I have a table with rows containing names ( id, name), ex:
1. Name1
2. Name31
3. Name4
..

I would like to have a stored procedure that returns a #table that has columns the names from the previous table, like that:
Name1 Name31 Name4 ...

How can I do that. I know I did this before but I can't remember

Please, can you help ? Thanks

ValterBorges
Master Smack Fu Yak Hacker

1429 Posts

Posted - 2002-10-29 : 16:51:55
If you're looking for a cross tab query here it is.

http://www.sqlteam.com/item.asp?ItemID=2955

Go to Top of Page
   

- Advertisement -