sql - Coldfusion - Comma delimiter with comma inside value -
i building list using sql data , trying make each value of list as: 'value1',value2','value,4'
, on. problem using code:
( select count(ns.ticket) ns_trade ns ns.[login]=mt.[login] , <cfif qgetcommentsaccounting.recordcount gt 0> ns.comment in ('#listchangedelims(qgetcommentsaccounting.list_comments, "','")#') <cfelse> 1=2 </cfif> )as no_of_tickets_accounting
which works perfect except when value has comma inside 'value,4'
. suggestions how solve that?
if both queries work on same database, way more kiss put them together. usually, should try as possible within database.
select count(ns.ticket) ns_trade ns ns.[login] = mt.[login] , ns.comment in ( select comment tbl_comment report_type = <cfqueryparam value="#arguments.type#" cfsqltype="cf_sql_varchar"> , report_id = <cfqueryparam value="#arguments.report_id#" cfsqltype="cf_sql_integer"> )
Comments
Post a Comment