scripter73
Programmer
Hi,
I have a query as follows:
<cfquery name="agency" datasource="#SESSION.DSN#" maxrows=20>
select agcy_agent_code,
agcy_agt_corp_name,
agcy_master_agent,
agcy_principal_name,
agcy_entity_type
from AGAGENCY
where (agcy_master_agent <> '' and Substr('#agcy_agent_code#',1,2) = '10')
</cfquery>
The datasource resolves and it grabs the fields, etc. It is the partial compare. I want to grab all records where one field (which is a text field) begins with 10.It hangs on the #agcy_agent_code# part.
I have tried all different combinations. I've tried putting quote around #agcy_agent_code# and the '10', I've tried taking them out, but nothing works.
The error message I keep getting is an Error Diagnostic,
Error resolving parameter AGCY_AGENT_CODE
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while processing an element with a general identifier of (#agcy_agent_code#), occupying document position (16:45) to (16:61).
Please help.
Thanks,
scripter73
Change Your Thinking, Change Your Life.
I have a query as follows:
<cfquery name="agency" datasource="#SESSION.DSN#" maxrows=20>
select agcy_agent_code,
agcy_agt_corp_name,
agcy_master_agent,
agcy_principal_name,
agcy_entity_type
from AGAGENCY
where (agcy_master_agent <> '' and Substr('#agcy_agent_code#',1,2) = '10')
</cfquery>
The datasource resolves and it grabs the fields, etc. It is the partial compare. I want to grab all records where one field (which is a text field) begins with 10.It hangs on the #agcy_agent_code# part.
I have tried all different combinations. I've tried putting quote around #agcy_agent_code# and the '10', I've tried taking them out, but nothing works.
The error message I keep getting is an Error Diagnostic,
Error resolving parameter AGCY_AGENT_CODE
ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while processing an element with a general identifier of (#agcy_agent_code#), occupying document position (16:45) to (16:61).
Please help.
Thanks,
scripter73
Change Your Thinking, Change Your Life.