My first query returns hundreds of records, all of which have a claim_id and an ident_type_id, but only a handfull have an ident_value. For the rest, the ident_value doesn't exist.
Here's the first query:
Now I need to determine, for a given range of ident_type_id's (ident_type_id is a number) if any of the corresponding ident_value's exist. If even one ident_value exists in that range, do something, if not, do nothing.
So I thought a query of the first query would accomplish this, but I'm not doing it correctly b/c I get the error: "Error: 'anyvalue' is not a number."
Is this even the best way to do this? What am I doing wrong?
Here's the second query (the query of the first query):
<cfquery dbtype="query" name="get_page_count">
select ident_value
from form_info
where
(
(ident_type_id >= 4151 and ident_type_id <= 4262)
or
(ident_type_id >= 4870 and ident_type_id <= 4885)
)
AND '#form_info.ident_value#' IS NOT NULL
</cfquery>
Thanks for any help!
Here's the first query:
Code:
<cfquery name="form_info" datasource="dbapp">
select claim_id, ident_type_id, ident_value
from sri_claims.dbo.claim_main
</cfquery>
Now I need to determine, for a given range of ident_type_id's (ident_type_id is a number) if any of the corresponding ident_value's exist. If even one ident_value exists in that range, do something, if not, do nothing.
So I thought a query of the first query would accomplish this, but I'm not doing it correctly b/c I get the error: "Error: 'anyvalue' is not a number."
Is this even the best way to do this? What am I doing wrong?
Here's the second query (the query of the first query):
<cfquery dbtype="query" name="get_page_count">
select ident_value
from form_info
where
(
(ident_type_id >= 4151 and ident_type_id <= 4262)
or
(ident_type_id >= 4870 and ident_type_id <= 4885)
)
AND '#form_info.ident_value#' IS NOT NULL
</cfquery>
Thanks for any help!