You can reference the database by name in the query
Ex:

select  t1.Field1, t2.Field2, t2.Field3
from            database1.dbo.Table1 t1
                inner join database2.dbo.Table2 t2 on t1.Field = t2.Field

you might need to put that into a stored procedure or use a dsnless
connection



-----Original Message-----
From: Chad Gray [mailto:cg...@careyweb.com] 
Sent: Friday, January 16, 2009 10:05 AM
To: cf-talk
Subject: join two databases

What is the best way to join tables across two databases servers?

Say I have one MS SQL server that has a database that stores ERP product
data.  I have our website MS SQL server that stores extra data about the
product records in the ERP database.

Is it possible to hook each datasource up in CF Admin and use both DSN's in
the same CFQuery?

Or should you do something on the MS SQL servers to join them then hook up
one datasource in CF Admin?

Chad





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:318062
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to