I have two queries, one dependent on on the other. The first query is as follows:
<cfquery name="Query1">
SELECT A,
B
FROM TABLE
WHERE A = '#form.field#'
</cfquery>
This query obviously queries on a value passed from another form. Multiple rows can be returned based on that value. An example of these results would be:
A B
16 Works1
16 Works2
16 Works3
The second query is as follows:
<cfquery named="Query2">
SELECT C,
D
FROM TABLE2
WHERE D IN '#Query1.B#'
</cfquery>
The problem here is I don't know how to get Query 2 to use the multiple values from Query1. Since Column B from Query1 returned values of Works1, Works2, and Works3, I'm not sure how to programmatically perform that query with those values. Any help would be appreciated.
V
<cfquery name="Query1">
SELECT A,
B
FROM TABLE
WHERE A = '#form.field#'
</cfquery>
This query obviously queries on a value passed from another form. Multiple rows can be returned based on that value. An example of these results would be:
A B
16 Works1
16 Works2
16 Works3
The second query is as follows:
<cfquery named="Query2">
SELECT C,
D
FROM TABLE2
WHERE D IN '#Query1.B#'
</cfquery>
The problem here is I don't know how to get Query 2 to use the multiple values from Query1. Since Column B from Query1 returned values of Works1, Works2, and Works3, I'm not sure how to programmatically perform that query with those values. Any help would be appreciated.
V