I want to import a text file with 3 fields in it ...
F1: Ident char(3)
F2: Note (Text) char(32,000) yeah big eh!
F3: Date
Field F2: has <CR><LF> thru it, this means the DTS import thinks its a
multiple records to deal with as each row is also delimited by <CR><LF>,
of course this causes problems when loading to the receiving table. The
import creates new records.
Hence is there a way to filter these formatting characters out easily
without disrupting the row delimiter. Using a VbScript, if anyone has
done this I'd be grateful of a copy of the script or utility.
The source of the file (IBM Iseries base app) cannot change the output
format.
Thanks in advance
Paul
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"Paul Scotchford" <paul.scotchford-eds@.eds.com> wrote in message
news:4091da3f$0$206$75868355@.news.frii.net...
> Env : SLQSERVER2000 - DTS
> I want to import a text file with 3 fields in it ...
> F1: Ident char(3)
> F2: Note (Text) char(32,000) yeah big eh!
> F3: Date
> Field F2: has <CR><LF> thru it, this means the DTS import thinks its a
> multiple records to deal with as each row is also delimited by <CR><LF>,
> of course this causes problems when loading to the receiving table. The
> import creates new records.
> Hence is there a way to filter these formatting characters out easily
> without disrupting the row delimiter. Using a VbScript, if anyone has
> done this I'd be grateful of a copy of the script or utility.
> The source of the file (IBM Iseries base app) cannot change the output
> format.
> Thanks in advance
> Paul
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
If the input file has fixed-width columns, then DTS should still work,
although you may need to set up the text file connection definition from a
script rather than with the interface. Alternatively, you could run the
input file through a script written in Perl, VB, C# etc. to replace the
delimiters with something else before loading it with DTS.
Simon
No comments:
Post a Comment