October 14, 2009 at 4:49 am
Hi dear friends,
I uploaded data on my sql server in a lacks of rows with the help of bulk insert T-SQL. After execution of my query, I checked from my table there is 10 rows are missing. How i can chek those rows which is missed or not inserted.
Pls help me out....
my query was like this,
BULK INSERT OrdersBulk
FROM 'c:\file1.txt'
WITH
(
FIRSTROW = 2,
MAXERRORS = 0,
FIELDTERMINATOR = ',',
ROWTERMINATOR = ''
)
Thanks in Advance.
Regards,
M.I.
________________________________________
M.I.
[font="Times New Roman"]
October 14, 2009 at 8:38 am
Try this:
BULK INSERT OrdersBulk
FROM 'c:\file1.txt'
WITH
(
FIRSTROW = 2,
MAXERRORS = 0,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '',
ERRORFILE = 'c:\file1_error.txt'
)
October 15, 2009 at 4:28 am
AlexSQLForums (10/14/2009)
Try this:BULK INSERT OrdersBulk
FROM 'c:\file1.txt'
WITH
(
FIRSTROW = 2,
MAXERRORS = 0,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '',
ERRORFILE = 'c:\file1_error.txt'
)
After run this query i got this error,
Msg 4861, Level 16, State 1, Line 1
Cannot bulk load because the file "c:\file1_error.txt" could not be opened. Operating system error code 80(error not found)
________________________________________
M.I.
[font="Times New Roman"]
October 15, 2009 at 2:51 pm
You need to create file named file1_error.txt under C drive before you run your code.
MJ
October 16, 2009 at 4:31 am
ya i was created still i am not getting any error messages in that...
M.I.
________________________________________
M.I.
[font="Times New Roman"]
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply