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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple search and replace

Status
Not open for further replies.

mbvis

Technical User
Jul 9, 2008
2
NL
Hello,

I have a database with 17,000 records. I want to know if it is possible to make a batch file where I can find and replace a lot of things at ones. For example:

Search Arens replace in A.
Search Kampen replace in K.
Search Ellis replace in E.

Is there a SQL statement or module?

Thanks a lot,
 
Arens, Kampen, Ellis

Are these field names or table names or dhe data in fields?
 
For each replacement you need an SQL update something like:

UPDATE TheTable SET TheField = 'A' WHERE TheField='Arens'

If your list of replacements is in a consistent electronic format (Excel sheet, CSV file, etc.) then you could write code to loop through the list, building and running each SQL Update one at a time.


Joe Schwarz
Custom Software Developer
 
Thanks for your replay. I have all the replacements in an electronic format. But how must i write the code? Is this in VBA as a module in Access?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top