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 |
|
pazzy11
Posting Yak Master
145 Posts |
Posted - 2007-12-18 : 06:44:03
|
| I need to insert data to a temp table in SQL ,I have [CODE]CREATE TABLE TMP_X (doc_name varchar(200))--select * from TMP_XINSERT into TMP_Xvalues('...,[/CODE]but its saying there isn't a match, and i know why its trying to insert all the data as one row, but i need them as seperate rows as i want only 1 column..is there another INSERT type function ? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2007-12-18 : 06:51:02
|
| useINSERT into TMP_XSELECT {value1}UNION SELECT {value2}UNION ..........to insert values as different rows... |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-18 : 06:55:18
|
[code]CREATE TABLE TMP_X(doc_name varchar(200))GOINSERT into TMP_Xselect col1 from TMP_X -- select only one column, not all with the * approach.[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|