You are here: Re: how to delete lines from text file « MsSQL Server « IT news, forums, messages
Re: how to delete lines from text file

Posted by billious on 10/09/06 03:31

"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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация