I would like to know if its possible to join the resultset of two previous querys in one query within a query.
It seems to work fine to loop over one query and join with the other one record at a time but sometimes it would bee nice to bee able to do something like this:
<cfquery name="q1" datasource="source1">
SELECT a,b FROM tab1
</cfquery>
<cfquery name="q2" datasource="source2">
SELECT c,d FROM tab2
</cfquery>
<cfquery name="finalquery" dbtype="query">
SELECT x.b,y.d
FROM q1 x, q2 y
WHERE x.a = y.c
</cfquery>
When trying this I get a
PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
error
Or do I have my head uma now?
It seems to work fine to loop over one query and join with the other one record at a time but sometimes it would bee nice to bee able to do something like this:
<cfquery name="q1" datasource="source1">
SELECT a,b FROM tab1
</cfquery>
<cfquery name="q2" datasource="source2">
SELECT c,d FROM tab2
</cfquery>
<cfquery name="finalquery" dbtype="query">
SELECT x.b,y.d
FROM q1 x, q2 y
WHERE x.a = y.c
</cfquery>
When trying this I get a
PCodeRuntimeContextImp::executeSQLTagCFQuery::endTag
error
Or do I have my head uma now?