Answered
String value changes single quote ' to double quote "
I am creating a list with different bill codes within single
quotes as follows
<cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800 ','1950 ','7001 ' ">
when I do an output
for
<cfoutput>AND idbillcode IN ( #corlist #)</cfoutput>
I get the values as follows
AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800 ','1950 ','7001 ')
However when I put the same string within a cfquery the single quotes get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700 '',''1800 '',''1950 '',''7001 '') which throws an error.
Anybody has any clues.
Thanks.
<cfset corlist = " '1100 ','1200 ','1300 ','1700 ','1800 ','1950 ','7001 ' ">
when I do an output
for
<cfoutput>AND idbillcode IN ( #corlist #)</cfoutput>
I get the values as follows
AND idbillcode IN ( '1100 ','1200 ','1300 ','1700 ','1800 ','1950 ','7001 ')
However when I put the same string within a cfquery the single quotes get replaced by double quotes as follows
AND idbillcode IN ( ''1100 '',''1200 '',''1300 '',''1700 '',''1800 '',''1950 '',''7001 '') which throws an error.
Anybody has any clues.
Thanks.