Page 1 of 1

How to handle this string

Posted: Mon Dec 19, 2011 9:12 pm
by vskr72
I have a strign like this assigned to a column:

Code: Select all

"IBM G52 17"" COLOR MONITOR (476)"
I want to convert this to

Code: Select all

IBM G52 17 COLOR MONITOR (476)
Tried using the following in Trim. But it gives a syntax error:

Code: Select all

Trim(Trim(ToTfm.DESCRIPTION, "\""), " ")
Any inputs pls? Thank you.

Posted: Mon Dec 19, 2011 9:28 pm
by pandeesh
For me it looks like:

Code: Select all

Convert(",'',trim(input))
If the above doesnt work try:

Escape the first argument \" and try.

Posted: Mon Dec 19, 2011 9:38 pm
by chulett
You just need to remove the double quotes? No need to escape anything, just use single quotes in the function call:

Code: Select all

Convert('"','',ToTfm.DESCRIPTION)

Posted: Mon Dec 19, 2011 10:21 pm
by vskr72
Craig - that worked good. Why didnt I think of this. I was always trying to use the escape character.