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

replace " (quotes) in field with update query

Status
Not open for further replies.

cdck

Programmer
Joined
Nov 25, 2003
Messages
281
Location
US
I have a database populated through an import from an older system. The description field often includes the " symbol, which in this case means inches, somewhere in the middle. Of course, it meant a whole other thing to the SQL database, so during the import any occurrence of " got turned into "". I need to run an update query that will replace any occurrence of "" with -IN.

Example of the intended result:

21"" monitor with double bezel

should become

21-IN monitor with double bezel

How do I accomplish this?

Cheryl dc Kern
 
Make sure you have a good backup before running this.

Code:
Update Table
Set    Field = Replace(Field, '""', '-IN')

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks! Will run the query in the morning - IT Director is gone for the day. I'll let you know how it goes!

Cheryl dc Kern
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top