Replacing Double Quotes with a Single Quote in Text Field


#1

I am trying to import a cvs file that has a field that has double quotes embedded in the text as shown below:

CLAMP,4"“37G/CM,3.5"” O.D.,304SS

I need a way to covert the double quotes to a single quote so the result would look like:

CLAMP,4"37G/CM,3.5" O.D.,304SS

I tried using the REPLACE(…) function but cannot figure our how to get a single quote back in. No matter what I try I end up with the double quote.

I’ve tried:

replace(PartDescription,"""",chr(34))
replace(PartDescription,"""",""+chr(34))
replace(PartDescription,"""",""+""")

I need to append approximately 100 records per day so I need a good method to update the information in this field after the records are appended to the master file.


#2

Try:

replacemultiple( PartDescription, "“:”", ":", ":" )

#3

Thanks Gary but no luck. I’m still getting the double quotes.


#4

That probably means that the double quote is not encoded the way that you are using the the replacemultiple( function. Copy and paste.


#5

True, I think they got converted to smart quotes in the transition. This is how they showed up when copied and pasted:
image

If they are just simple double quotes then you should be able to make them single quotes using:

arraystrip(PartDescription, {"})

#6

If you want to replace double quotes with single quotes, then this formula would work, too:

replace( PartDescription, '""' , '"')

Since quotes are text markers in Panorama X, you have to surround them with a different set of quotes when you are searching for the quotes themselves.


#7

The arraystrip( worked perfectly.

Thanks to all.