Not to diverge this topic to much, but something I've been wondering how to do, but
have always found other ways to do it.
Suppose I have a page with 2 CFQUERY's on it. What I would like to do is create a 3rd
CFQUERY that is a selection off of the other two. In other words suppose query 1
returns a result set that has a customer number and name and the 2nd query returns a
result set with a job number, due date and customer number. I would like to do
something like the following:
<CFQUERY name="custdata" datasource="custdatadsn">
select acctno, name from custfile
</CFQUERY
<CFQUERY name="jobdata" datasource="jobdatadsn">
select jobno, duedate, custno from jobfile
</CFQUERY>
<CFQUERY name="finaldata">
select jobdata.jobno, jobdata.duedate, jobdata.custno, custdata.name
from jobdata
left outer join custdata
on jobdata.custno = custdata.acctno
</CFQUERY>
Hope I haven't confused things! Thanks!
Bill Grover
Supervisor, IS
EU Services, Inc.
649 N Horners Ln
Rockville MD 20850
Phone: 301-424-3300 x396
FAX: 301-424-3300 x1396#
E-Mail: [EMAIL PROTECTED]
---- Original Message -----
>> Date: Tue, 25 Jul 2000 12:57:45 -0400
>> From: [EMAIL PROTECTED]
>> To: [EMAIL PROTECTED]
>> Subject: RE: Can i use 2 datasources in one app?
>> Message-ID: <31860BB65652D31182E7002035221E1A0243509A@KDEMAILN1>
>> I'll be shocked if you can get that to work across servers (unless you
>> configure SQL Server specifically for this function). Across databases on
>> the same server, no problem.
>> -----Original Message-----
>> From: Nagai, Paul [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, July 25, 2000 12:46 PM
>> To: '[EMAIL PROTECTED]'
>> Subject: RE: Can i use 2 datasources in one app?
>> It can work with SQL Server, too (if the databases are on the same server
>> ... and possibly, even if they're not).
>> I'm working on a query that looks like this:
>> <cfquery name="MyQuery" datasource="MyDatasource">
>> SELECT *
>> FROM Table INNER JOIN servername.databasename.dbo.table2
>> ON Table.field1 = servername.databasename.dbo.table2.field2
>> </cfquery>
>> ------
>> Paul Nagai
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.