Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Selectively copying records from one table to another
Message
From
06/06/2010 15:13:34
 
 
To
06/06/2010 15:00:12
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01467562
Message ID:
01467575
Views:
38
Will that append the records to the target table?

Bill, no, it will not.

When you do a SELECT Field_List into NewTable from OldData, NewTable cannot already exist. (If it does, you'll get an error). So it's not additive.

SELECT INTO NewTable is great when the table doesn't exist - it gets created....but again, if it already exists, you'll get an error.


If you want to append rows into an existing target table...you can do an INSERT INTO....SELECT....such as

INSERT TO "TableYouWantToAppendTo" Select "columns" from ExistingTable. (You'll need to be careful with the matching column lists)

Hope that helps...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform