Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01641338
Message ID:
01641339
Views:
46
>Hi,
>
>I am trying to insert records (only certain fields) from one table to another and I tried the following syntax (which does not work):
>
>
>insert into MyTable1( field1, field2, field3) select field1, field2, field3 from MyTable2 
>
>
>Note that I want to insert ALL records from the MyTable2 into MyTable1.
>
>What am I doing wrong?
>
>TIA

Your syntax is correct. Do you get errors, if yes, what are they? I suspect you may have triggers on the table that changes the behavior...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View