Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removal of charachters

Status
Not open for further replies.

Mary10k

IS-IT--Management
Joined
Nov 8, 2001
Messages
103
Location
US
Hello,
I have a 600,000+ row flat file in .txt format. Each row contains multiple "|" delimiters and I need to strip out the "", leaving the pipe|.

The quotes are ASCII 34. Any suggestions how I can do this? I am unable to import the file into SQL server with the format of "|" because some rows have a <cr> in the middle which skews the row. Some rows begin without the leading quote and look like: data"|.

Thank you.
 
MSWord or WordPad, if it either can handle that big a file otherwise a quick VB program. I think it can be done with DOS commands, but I forget how.
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
in the text file, why don't you select edit/replace and replace " by blank if you don't need to do it programatically.

or replace "|" by |
 
this is such a large file, I was wishing for a program to do this rather than doing it manually through find and replace.
 
Ahh manually??? How 'bout Change All button?
-Karl

[red] Cursors, triggers, user-defined functions and dynamic SQL are an axis of evil![/red]
[green]Life's uncertain...eat dessert first...www.deerfieldbakery.com[/green]
 
You could write a quick vbscript (or some other languae, the language is not that important) using regular expressions to change your data. From what my friends who know regular expressions, this kind of thing is only a few lines of code, so it shouldn;t take long once you spend a little time reading up on regular expressions and how to use them.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top