February 22, 2012 at 11:48 pm
Hello,
I have a .csv file which contains 4 million records. I am using Bulk Insert command to import the file into SQL Server table.
The file contains following information.
"Service Area Code","Phone Numbers","Preferences","Opstype","Phone Type"
"17","9861445262","0","A","2"
"17","9861395056","0","A","2"
"12","9883501787","0","D","2"
"13","9827558308","0","D","2"
"13","9827397456","0","D","2"
"13","9827477119","0","D","2"
"17","9861037312","0","A","2"
"17","9861144351","0","A","2"
"17","9861308927","0","A","2"
"17","9861012494","1","A","2"
The Bulk insert command I am using to import the data
bulk insert dbname.dbo.table
from 'Drive:\folder_name\2122012.csv'
with
(
keepnulls,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '',
DATAFILETYPE = 'char',
FIRSTROW = 2,
ERRORFILE ='Drive:\folder_name\err.txt'
)
I am getting
0 row(s) affected as a result. There is no error report.
Please help.
Thanks
Rohit
February 23, 2012 at 4:16 am
Duplicate post. No replies please.
Discussion already started here
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply