Loop your queries and add them to a one query let us call it Batch_Qry
<!--- set the query columns--->
<cfset Batch_Qry = querynew("Col_1, Col_2">
<cfscript>
iRow = queryaddrow(Batch_Qry); // add a row @ the end
// add values to the row
QuerySetCell(Batch_Qry,"Column name Col_1","value");
QuerySetCell(Batch_Qry,"Column name Col_2","value");
</cfscript>
Now you have only one query
Ok Good luck
-----Original Message-----
From: Christopher McGrath [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 4:57 PM
To: [EMAIL PROTECTED]
Subject: [ cf-dev ] Joining queries from different datasources
Hi all,
I have two queries from two different datasources I need to combine.
The first query is
<cfquery name="query1" datasource="ds1"> SELECT EmailWizardStepKey,
Completed FROM #Client.DBPrefix#.vuEmailWizardStepStatus
WHERE EmailJacketKey = <cfqueryparam cfsqltype="cf_sql_integer"
value="#Client.EmailJacketKey#"> AND USERKEY = <cfqueryparam
cfsqltype="cf_sql_integer" value="#Client.UserKey#"> </cfquery>
The second query is:
<cfquery name="query2" datasource="ds2"> SELECT EmailWizardStepKey, P2P,
DPF, Title FROM EmailWizardStep </cfquery>
I am needing to combine the two queries so I can loop through them and
output everything.
Any ideas?
TIA
---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you're looking for faster.
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]