I am using the DTS COM object to import a bunch of different text files.
some are 2 or 3 million rows. if there's an invalid row (can't find
row delimiter or column delimiter) sometimes DTS will crash and stop the
import... it even does it if I try to import it from the GUI, and going
into DTS tasks and messing with the errors rows, etc.
So, I am looking for a better way to batch import... can't use bulk
insert because of field qualifiers... any ideas? any 3rd party object i
can use to quickly import a large file?
i using c#, btw.
thanks
EdDid you look at the bcp utility? It ain't pretty, but for brute force,
it is hard to beat.|||Bulk insert and bcp both can use format file (i.e. you can specify your
custom terminator), batch size, and allowable max error. You should check
them out.
-oj
"Ed West" <west@.westville.com> wrote in message
news:OQxMbDxCFHA.3492@.TK2MSFTNGP12.phx.gbl...
>I am using the DTS COM object to import a bunch of different text files.
>some are 2 or 3 million rows. if there's an invalid row (can't find row
>delimiter or column delimiter) sometimes DTS will crash and stop the
>import... it even does it if I try to import it from the GUI, and going
>into DTS tasks and messing with the errors rows, etc.
> So, I am looking for a better way to batch import... can't use bulk insert
> because of field qualifiers... any ideas? any 3rd party object i can use
> to quickly import a large file?
> i using c#, btw.
> thanks
> Ed|||hi - many thanks, bcp/bulk insert is working great... i am creating a
format file dynamically.
thanks again
oj wrote:
> Bulk insert and bcp both can use format file (i.e. you can specify your
> custom terminator), batch size, and allowable max error. You should check
> them out.
>|||Hello - what about a Field Qualifier? how can I specify that? For some
files, the field qualifier is " and that is showing up in the database
field after being imported... thanks
- Ed
oj wrote:
> Bulk insert and bcp both can use format file (i.e. you can specify your
> custom terminator), batch size, and allowable max error. You should check
> them out.
>
Friday, February 17, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment