Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Error during import of pipe-delimited text file

Posted on 2005-04-11
11
Medium Priority
?
576 Views
Last Modified: 2008-02-01
I tried importing a pipe-delimited text file and got the following error: Could not find the selected row delimiter within the first 8kb of data. Is the Selected row delimiter valid?

FileType: ANSI
RowDelimiter: {CR}{LF}
Text Qualifier: None


0
Comment
Question by:rotny
  • 4
  • 4
8 Comments
 
LVL 25

Accepted Solution

by:
jrb1 earned 1500 total points
ID: 13757921
It's looking for a carriage return, linefeed at the end of each line.  If you can look at your data with an editor that shows hex characters, you can see what really exists.  Maybe just {CR} or {LF}.

If you're going through the wizard, use just one or the other as the row delimiter.

If you're editing the parameters directly, try:

ROWTERMINATOR = '\n'

and if that still gives the error, try:

ROWTERMINATOR = '\r'
0
 
LVL 9

Expert Comment

by:sudheeshthegreat
ID: 13765294
if you are using DTS to import the data, after you select the text file source
in the screen 'Select file format', you need to select 'Delimited': the default is 'Fixed fied'
and in the next screen 'Specify Column Delimeter', you can specify the pipe symbol | in the textbox.
hope that helps.
0
 
LVL 25

Expert Comment

by:jrb1
ID: 13956656
I believe the solution given should have solved the problem.  It was straight out of the documentation.  But no response.....
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 9

Expert Comment

by:sudheeshthegreat
ID: 13974821
It is a pipe-delimited text file that the author mentions. In this case, instead of using '\r' or '\n', the delimiter should be changed to '|' as I mentioned earlier.

I hope the author gets back on what is the field-delimiter and row-delimiter for the text file.
0
 
LVL 25

Expert Comment

by:jrb1
ID: 13974847
True, it is a pipe delimited.  But the problem wasn't in delimiting fields, it was in finding the end of line...the row delimiter was bad.
0
 
LVL 9

Expert Comment

by:sudheeshthegreat
ID: 13974870
Yes, and that is where I would like to ask the author if the row-delimiter is indeed a CR or LF?
The text file could have single field pipe-delimited values, in which case it becomes the row-delimiter.
And I made the above comments based on the assumption that '|' is the row-delimiter (since the CR/LF are not found).
0
 
LVL 25

Expert Comment

by:jrb1
ID: 13974882
Ah, I see.  I guess I've never had that happen.  The only time I've seen this error is when files are moved between machines and the CRLF at the end of the row comes through as only CR or LF.
0
 
LVL 9

Expert Comment

by:sudheeshthegreat
ID: 13974913
In this case, are you sure the CRLF transforms to CR or LF when the files are transferred across machines? Storing the CRLF as CR, LF or CRLF is based on the Operating System (AFAIK) and this should happen only when you save a text file locally. In my experience, transferring files retains the CRLF, say from Windows to Linux. Hmm, shifting away from the topic, eh?

I guess we better wait for the author to throw more light on what row-delimiter the text file actually has.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question