|
Posted by batman on 10/09/06 04:26
good point...
in fact the file is a text file but contains the infamous blank square
all throughout. end and start of data have the square around them as
well., i looked up the exact character and it seems to be a simple
char(10). so it would be helpful to account for this in the
batchfile/sql.
billious wrote:
> "batman" <uspensky@gmail.com> wrote in message
> news:1160363613.855662.104440@b28g2000cwb.googlegroups.com...
> >i have a text file that is like:
> >
> > date = OCT0606
> > asdf
> > sdaf
> > asdfasdgsdgh
> > asdfsdfasdg
> > START-OF-DATA
> > asdfasdfg
> > asdfgdfgsfg
> > sadfsdfgsa
> > asdfgsdfg
> > END-OF-DATA
> > asdfgalsdkdfklmlkm
> > asdfgasdfg
> >
> >
> >
> > i need to clear everything from this file except the data between the
> > START-OF-DATA and END-OF-DATA using a batcj file... elternitavly i am
> > open to suggestions of how to import using bulk insert in sql without
> > changing the file at all. data is pipe seperated but obvioulsy has
> > plenty of junk data in it. i have 2 similar files at about 30mb and
> > 60mb in size. thnks everyone
> >
>
> Since you are posting from XP, do you want an XP solution?
> alt.msdos.batch.nt deals with NT-series, and alt.msdos.batch with DOS and
> 9x.
>
> Meanwhile, since pipe is a special character in DOS, can you be a little
> more explicit about the contents of your file? How is
> START-OF-DATA/END-OF-DATA detected (does it involve the presence of a pipe
> or is it contained in one or more data-fields?) Does any line start with a
> semicolon? Is there any non-alphameric content other than the pipes?
Navigation:
[Reply to this message]
|