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 |
oukuri
Starting Member
7 Posts |
Posted - 2012-12-18 : 02:25:32
|
Hi i am trying to use 'Insert Bulk' likeInsert Bulk newpersontable select FIRST_NM,LST_NM,MIDDLE_NM,GNDR,STU_ID,CMP_ID,CALNETUID,UC_LOC,ANIDfrom PERSONBut facing below error.Net SqlClient Data Provider: Msg 4022, Level 16, State 1, Line 1Bulk load data was expected but not sent. The batch will be terminated.Can any one tell how to correct thisoukuri |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-18 : 02:29:01
|
If both table newpersontable, person tables are in same database and same instance, then Insert INTO Bulk newpersontableSELECT FIRST_NM, LST_NM, MIDDLE_NM, GNDR,STU_ID,CMP_ID,CALNETUID,UC_LOC, ANID from PERSON--Chandu |
|
|
oukuri
Starting Member
7 Posts |
Posted - 2012-12-18 : 05:37:11
|
Incorrect syntax near the keyword 'Bulk'.oukuri |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2012-12-18 : 05:38:28
|
quote: Originally posted by oukuri Incorrect syntax near the keyword 'Bulk'.oukuri
Strike out that part, then execute...Insert INTO newpersontableSELECT FIRST_NM, LST_NM, MIDDLE_NM, GNDR,STU_ID,CMP_ID,CALNETUID,UC_LOC, ANID from PERSONIf the tables are in different servers, then you have to use linked server..--Chandu |
|
|
|
|
|
|
|