dbTalk Databases Forums  

Invalid delimited data

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Invalid delimited data in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
goinesj@paec.org
 
Posts: n/a

Default Invalid delimited data - 11-08-2004 , 03:43 PM






When creating a new package under Data Transformation Services with the
following information, you get the error message of “Invalid delimited data”.
Row one will import correctly. Row two will fail.

“0035”,”C”,”525 W DAVIS RD”,”ANYCITY”,”FL”,”12345”
“0036”,”C”,”1252 S 1ST STREET, 125”,”ANYCITY”,”FL”,”12345”

The error is at the comma before the apartment number because it takes it as
the beginning of a new column. This then creates the error for missing
delimiters as discussed in BUG #: 56479. The suggested workaround was to
edit the file, but with 8000+ records that is impractical.

Since the DTS functions from inside Databases, All Tasks, Import Data works
correctly with these two lines, what is the difference between the areas?


Reply With Quote
  #2  
Old   
JFB
 
Posts: n/a

Default Re: Invalid delimited data - 11-09-2004 , 08:44 AM






Hi,
The best solution for this is to use regular expresions to clean the file
before import with dts.
One idea is to replace "," with something like @@@ then replace " with
someting else like #### then delete all the extra commas and put all you
delimeters again in place.
Here is some info in how to use RE
http://aspnet.4guysfromrolla.com/articles/022603-1.aspx
I hope this help.
JFB

"goinesj (AT) paec (DOT) org" <goinesj (AT) paec (DOT) org (AT) discussions (DOT) microsoft.com> wrote in
message news:150938A8-8008-48C7-B8F3-3C04F29F7DA1 (AT) microsoft (DOT) com...
Quote:
When creating a new package under Data Transformation Services with the
following information, you get the error message of "Invalid delimited
data".
Row one will import correctly. Row two will fail.

"0035","C","525 W DAVIS RD","ANYCITY","FL","12345"
"0036","C","1252 S 1ST STREET, 125","ANYCITY","FL","12345"

The error is at the comma before the apartment number because it takes it
as
the beginning of a new column. This then creates the error for missing
delimiters as discussed in BUG #: 56479. The suggested workaround was to
edit the file, but with 8000+ records that is impractical.

Since the DTS functions from inside Databases, All Tasks, Import Data
works
correctly with these two lines, what is the difference between the areas?




Reply With Quote
  #3  
Old   
Allan Mitchell
 
Posts: n/a

Default RE: Invalid delimited data - 11-09-2004 , 09:47 AM



I just tried your File on my SQL Server

Microsoft SQL Server 2000 - 8.00.892 (Intel X86)
Dec 5 2003 13:58:42
Copyright (c) 1988-2003 Microsoft Corporation
Enterprise Edition on Windows NT 5.0 (Build 2195: Service Pack 3)

and I specify that the file has Text Qualifier of ". The import works just
fine.



"goinesj (AT) paec (DOT) org" wrote:

Quote:
When creating a new package under Data Transformation Services with the
following information, you get the error message of “Invalid delimited data”.
Row one will import correctly. Row two will fail.

“0035”,”C”,”525 W DAVIS RD”,”ANYCITY”,”FL”,”12345”
“0036”,”C”,”1252 S 1ST STREET, 125”,”ANYCITY”,”FL”,”12345”

The error is at the comma before the apartment number because it takes it as
the beginning of a new column. This then creates the error for missing
delimiters as discussed in BUG #: 56479. The suggested workaround was to
edit the file, but with 8000+ records that is impractical.

Since the DTS functions from inside Databases, All Tasks, Import Data works
correctly with these two lines, what is the difference between the areas?


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.