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.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Import large text file with unix newline

Author  Topic 

paulb
Starting Member

1 Post

Posted - 2005-07-01 : 11:53:39
Hi there,

I have a large file (4 million lines) that I will need to import on a daily basis. I have run across the problem with the Unix newline character as the RowTerminator. The FieldTerminator is a tab.

I need to use the Bulk Insert statement and have tried the followng without success.

BULK INSERT RawData
FROM 'c:\usr\temp\TestImport.txt'
WITH
(
FIELDTERMINATOR = '\t',
ROWTERMINATOR = '\r'
)

I can import the data using DTS, but I can't get Bulk Insert to work.
I've tried every combination of "\r" "\n" that I can think of.
The DTS package needed "{LF}" to make it work, hence the "\r".

I can post a link to 4-5 lines of the import file if this would help.

Any help would be appreciated


Paul


   

- Advertisement -