sql query help

hi all
i have customer field name as custfield and the data is stored as "NYS INCOME TAX,"
i want to remove those quotes in the front and the end and remove the ,
i need something like this NYS INCOME TAX
can someone tell me how to do this in sql query
Who is Participating?
Koen Van WielinkConnect With a Mentor Business Intelligence SpecialistCommented:
Use this:

update yourTable
set custfield = REPLACE(REPLACE(custfield, '"', ''),',','')

Open in new window

Of course you have to be sure there are no quotes and commas in the string itself that you want to keep. If there are, we have to modify the logic a bit.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.