Hi,
Example:
<cfquery name="QUERY 1" datasource="MyDatabase">
SELECT Table1ID, A, B, C
FROM Table1
WHERE A = #Form.A#
<cfoutput query="QUERY1">#A#<br></cfoutput>
It returns:
3
4
<cfquery name="QUERY 2" datasource="MyDatabase">
SELECT Table2ID, A, Z, Y
FROM Table2
WHERE A IN (3,4)
<cfoutput query="QUERY
2">#Table2ID#</br></cfoutput>
It returns:
a
b
c
d
e
f
But if I make QUERY2 as:
<cfquery name="QUERY 2" datasource="MyDatabase">
SELECT Table2ID, A, Z, Y
FROM Table2
WHERE A IN (#QUERY1.A#)
it returns only:
a
b
c
The values a,b,c are the Table2ID's where A=3
The values d,e,f are the Table2ID'a where A=4
How can I make return all values?
Hope you understand.
Thanks
Manel