Re: Advice for how to search/replace a 2gb text file
It depends on the format of the data file, but basically you write a program to read the file line by line and do the replacements on each line. Use whatever programming language you're comfortable with (there's probably no language that can access the database that won't work), or whatever one the programmer you have doing the job is comfortable with.
We do this with XML files, xls files, text files, CSV files (and what some people call CSV files that I call plain old corruption). If a programming language can read the file, replacing a character in it during the database load is trivial. (I've only done it in C, Pascal, VB and PHP, because those were the languages I was working in when I needed to do it, but any language will work.)
|