Page 1 of 1

Trim ' and "

Posted: Thu Jun 19, 2008 5:16 am
by devidotcom
Hi All,

I have a requirement to trim i.e, remove single quote ' and double quote " from a string.

How can I do this.
I tried the following

Trim (string,'"','A') and also Trim(string,''','A')

But this does not work.

Any help.

Thanks
Devi

Posted: Thu Jun 19, 2008 5:34 am
by mahadev.v
Try with an escape character. Like Trim(Input.Col,"\'",'A'). Or use the ascii value for the characters. Trim(Input.Col,CHAR(39),'A')

Posted: Thu Jun 19, 2008 6:04 am
by ArndW
In Server

Code: Select all

TRIM(\"'\,'A')
would work but I don't know if that applies to PX transforms. If not, use

Code: Select all

TRIM(CHAR(34):CHAR(39),'A')

Posted: Thu Jun 19, 2008 9:12 pm
by ray.wurlod
Does backslash work as a quote character? If so you can have

Code: Select all

Convert(\'"\,\\,InLink.TheColumn)