Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert records from one table to another
Message
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01641338
Message ID:
01641340
Views:
38
>>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...

The name MyTable2 was underlined with squiggly red line. The table does have triggers. Is there a way to exclude the triggers?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform