Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cfquery datasource for multiple databases 1

Status
Not open for further replies.

gatetec

MIS
Mar 22, 2007
420
US
I have a cf query that pulls out from two databases (MS SQL 2000).

select empid, lname, fname, jobtitle, bla....
from EMPHRDB..empdemo
where jobtitle not like '%Regular%' and
bla....
empid NOT IN (select empidsev
from EMPSEVDB.empsevdemo
where hirestatus not like '%term%')
order by empid, bla....

As you can see, there are two separate databases, EMPHRDB and EMPSEVDB.

In this case, what/how do you put for 'datasource' <cfquery name ="getempdemo" datasource ="????????">

thx much
 
You can use a single datasource so long as the login has rights to both databases.

Phil Hegedusich
Senior Programmer/Analyst
IIMAK
-----------
Pity the insomniac dyslexic agnostic. He stays up all night, wondering if there really is a dog.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top