I am new to ColdFusion and am trying to query something and use it in the cfscript. I cannot use actual code here, but here is a general SQL query I hope will help. It's a old script and I am trying to change it from cfquery tags to cfscript tags.
<cfscript>
    sqlCF = queryExecute("SELECT primarykey FROM names, personnel  
                          WHERE name.primaykey = personnel.primarykey 
                          AND ( upper(personnel.ID LIKE upper(':id%') OR 
                                upper(personnel.userID) LIKE upper(':id%')
                              )
                        , {id={value = "xyz123", cfsqltype="cf_sql_varchar}}
                        , {datasource=person"}); 
writeDump(sqlCF);
</cfscript>
When I run it, it shows up as 0 queries, but when I hard code it in and change the :id% part of the query to xyz123% as the value it works.  I just do not know how the LIKE('XXXX%'), with a wild card sign, should be passed or if this even looks right.  Any ideas?
 
     
    