I'm trying to load data from a .txt file into SQL Server using the following:
BULK INSERT tblHours
FROM 'c:\test.txt'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
My text file contains:
HourId,HourCnt,WorkDt,ProjId,TypeCd
1,2,'2005-07-30',3,'COMP'
2,2,'2005-07-31',3,'COMP'
I'm getting the following error:
"Bulk insert data conversion error (type mismatch) for row 2, column 3 (WorkDt)"
I've tried many different date formats with no success. Any ideas?
BULK INSERT tblHours
FROM 'c:\test.txt'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
My text file contains:
HourId,HourCnt,WorkDt,ProjId,TypeCd
1,2,'2005-07-30',3,'COMP'
2,2,'2005-07-31',3,'COMP'
I'm getting the following error:
"Bulk insert data conversion error (type mismatch) for row 2, column 3 (WorkDt)"
I've tried many different date formats with no success. Any ideas?