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 |
|
dcarva
Posting Yak Master
140 Posts |
Posted - 2004-11-15 : 12:11:34
|
| Hello,I currently use SELECT INTO to copy data from a table into a temporary table without using DTS. However, I also want to be able to append data to a table. Unforunately, SELECT INTO does not append data into a table. It actually creates the table. So how can I select data into an existing table? I tried BULK INSERT but it only works with a data file. It seems like my only other option is to insert the data row by row. Is there a simpler way?Thanks! |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-11-15 : 12:20:03
|
| INSERT INTO- Jeff |
 |
|
|
dcarva
Posting Yak Master
140 Posts |
Posted - 2004-11-15 : 12:23:19
|
| Right, I could use INSERT INTO, but I would have to create a row at a time. Right? ( Unlike SELECT INTO, where it can select the data to insert using a WHERE clause.)Thanks |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2004-11-15 : 12:26:17
|
| no -- read up on it in Books On-Line.INSERT INTO DestTable (Col1, Col2, ...)SELECT Col1, Col2, ...FROM SourceTableThe SELECT part is any normal SELECT statement, with joins and filters and whatever you need.- Jeff |
 |
|
|
dcarva
Posting Yak Master
140 Posts |
Posted - 2004-11-15 : 13:29:12
|
| Very cool. Thanks! |
 |
|
|
|
|
|