Pregunta
cfscript query of queries not working with where clause
trying to get query of queries to work in script. It wil not work when where clause is added.
I have a function and i pass in a query and trying to query that passed in query.
it works when i take out the where clause: cannot find any docs that specify the where clause being written differently. thanks.
function(query orgData){
adminUsersQuery = new Query();
adminUsersQuery.setDBType('query');
adminUsersQuery.setAttributes(sourceQuery=orgData);
adminUsersQuery.addParam(name='region', value='midwest', cfsqltype='cf_sql_varchar');
adminUsersQuery.setSQL("SELECT distinct aoi FROM sourceQuery where region = :region");
newOrgData = adminUsersQuery.execute().getResult();
}
