Viewing 7 posts - 1 through 7 (of 7 total)
Jim,
Problem solved... 🙂
The format file is in Unicode format. It needs to be saved a plain ASCII Text file.
I was able to duplicate the issue with your original...
November 21, 2008 at 7:38 am
Jim,
A good hex editor to use is Ultra-edit. I have used it extensively when dealing with flatfiles. Avoid Notepad, it will handle CR, CR\LF, and LF all the same...
November 20, 2008 at 6:09 am
Jim,
So my code worked for you? If so, just substitute your files in place of mine and see what happens.
Also, may be completely unrelated, but I have had...
November 19, 2008 at 12:13 pm
Jim,
They were backslash-r, backslash-n in the format file and the bulk insert.
Todd
November 19, 2008 at 11:15 am
Jim,
I was able to get the following code to run ok. I am running SQL 2005 SP2.
drop table ##c
go
create table ##C (
[FLD1] varchar(5)
,[FLD2] varchar(6)
,[FLD3] varchar(7)
)
go
bulk insert ##C
from 'C:\Users\tedwards\documents\data.txt'...
November 19, 2008 at 9:54 am
Jim,
Two things, I think the format file you have is not right. You have
9.0
1
1 SQLCHAR 0 2016 1 "\r" [JUNK] ""
Should be
9.0
1
1 SQLCHAR 0 2016 "\r" 1...
November 18, 2008 at 10:01 am
Viewing 7 posts - 1 through 7 (of 7 total)