select distinct ruleid from MyRulesWITH (NOLOCK)
where
fieldid in (<cfqueryparam value="#arguments.fields#" cfsqltype="cf_sql_varchar" list="true" />)
<cfif variables.scorecardIds neq "">
and name in (#listqualify(variables.name,"'",",")#)
</cfif>
where
fieldid in (<cfqueryparam value="#arguments.fields#" cfsqltype="cf_sql_varchar" list="true" />)
<cfif variables.scorecardIds neq "">
and name in (#listqualify(variables.name,"'",",")#)
</cfif>