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.
| Author |
Topic |
|
vin
Starting Member
26 Posts |
Posted - 2003-03-12 : 06:51:40
|
| hiAssume i have a table..col1 col2---- ----- xxx india xxx us xxx chinaBased on the values in col2, i need to createa temporary table, whose column names has to beselected from col2. This has to be done dynamicallyas the values in col2 can change and using those values create a temp table dynamicallyeg.. create table #xxx (india varchar,us varchar, china varchar)How should i go about this. ? In my SP should i use a cursor to select and store the data in col2.?If show, how would i substitue those values in create tablestatement?Please suggest meregardsvin |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
|
|
|
|
|