dbTalk Databases Forums  

BulkCopy ExportData delimiter choice embedded in field

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


Discuss BulkCopy ExportData delimiter choice embedded in field in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Darian Miller
 
Posts: n/a

Default BulkCopy ExportData delimiter choice embedded in field - 07-25-2004 , 02:55 PM






Is there no way around the problem of preventing garbage data from screwing
up an ExportData and corresponding ImportData using a BulkCopy object? I
was using the tab as the delimiter until some errant data (an embedded tab)
in a field caused the import to fail. You can set your own delimiter, but
wouldn't it be inevitable that some errant garbage in a field will cause the
same problem?

How are you handling this?

Thanks,

Darian




Reply With Quote
  #2  
Old   
Darian Miller
 
Posts: n/a

Default Re: BulkCopy ExportData delimiter choice embedded in field - 07-28-2004 , 09:31 AM






"Darian Miller" <darian-remove- (AT) promaxautonews (DOT) com> wrote

Quote:
Is there no way around the problem of preventing garbage data from
screwing
up an ExportData and corresponding ImportData using a BulkCopy object? I
was using the tab as the delimiter until some errant data (an embedded
tab)
in a field caused the import to fail. You can set your own delimiter, but
wouldn't it be inevitable that some errant garbage in a field will cause
the
same problem?

I take it not too many people use the BulkCopy object? Or, is this the
wrong forum perhaps?

Darian




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

Default Re: BulkCopy ExportData delimiter choice embedded in field - 07-28-2004 , 10:01 AM



Do you refer to the BulkCopy object in DMO ?

Embedded delimiters is always a problem regardless of delimiter.

On way to do it would be to cleanse the text file and get rid of embedded
delimiters.
Another way would be to clean the file to another file. Your rows that are
good should contain a known amount of delimiters so when you encounter a row
with more than this amount you could write it out to a file as a bad row

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"Darian Miller" <darianmiller (AT) gospamyourself (DOT) com> wrote

Quote:
"Darian Miller" <darian-remove- (AT) promaxautonews (DOT) com> wrote in message
news:eEmEqHocEHA.1408 (AT) TK2MSFTNGP12 (DOT) phx.gbl...
Is there no way around the problem of preventing garbage data from
screwing
up an ExportData and corresponding ImportData using a BulkCopy object?
I
was using the tab as the delimiter until some errant data (an embedded
tab)
in a field caused the import to fail. You can set your own delimiter,
but
wouldn't it be inevitable that some errant garbage in a field will cause
the
same problem?


I take it not too many people use the BulkCopy object? Or, is this the
wrong forum perhaps?

Darian





Reply With Quote
  #4  
Old   
Darian Miller
 
Posts: n/a

Default Re: BulkCopy ExportData delimiter choice embedded in field - 07-29-2004 , 11:24 AM



Thanks for the reply!

I suppose one manual pass through the file before importing it would still
be quicker than any alternative. Thanks for pointing out the obvious.

Darian

"Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote

Quote:
Do you refer to the BulkCopy object in DMO ?

Embedded delimiters is always a problem regardless of delimiter.

On way to do it would be to cleanse the text file and get rid of embedded
delimiters.
Another way would be to clean the file to another file. Your rows that
are
good should contain a known amount of delimiters so when you encounter a
row
with more than this amount you could write it out to a file as a bad row



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.