Guest_imported
New member
- Jan 1, 1970
- 0
I'm using CF 4.5 and querying an Access2000 database. I am trying to query the database to return records that match a string value list. however, some of these elements contain single quotes. I can't seem to force a differentiation between the single quotes that separate the elements and those that are contained in the string, especially since CFQUERY seems to require that string elements are specfied by a single quote. Some examples of things that I've tried but don't work:
results.CHEMICAL IN ('1,1'- biphenyl, 2,2'- diethyl-')
results.CHEMICAL IN ("1,1'- biphenyl, 2,2'- diethyl-"
((results.CHEMICAL= '1,1'- biphenyl, 2,2'- diethyl-'))
((results.CHEMICAL= "1,1'- biphenyl, 2,2'- diethyl-"
)
<cfset chemical = "1,1'- biphenyl, 2,2'- diethyl-">
#PreserveSingleQuotes(chemical)#
Help would be greatly appreciated
results.CHEMICAL IN ('1,1'- biphenyl, 2,2'- diethyl-')
results.CHEMICAL IN ("1,1'- biphenyl, 2,2'- diethyl-"

((results.CHEMICAL= '1,1'- biphenyl, 2,2'- diethyl-'))
((results.CHEMICAL= "1,1'- biphenyl, 2,2'- diethyl-"

<cfset chemical = "1,1'- biphenyl, 2,2'- diethyl-">
#PreserveSingleQuotes(chemical)#
Help would be greatly appreciated