House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / ColdFusion Talk (CF-Talk)

SQL Query - Can you do this

Author:
Tim Do
01/29/2003 02:52 PM

use dbname..tablename I have a question and I am not sure if you can do this. I need to do a query join information from two separate tables in different database. Both databases are on the same SQL server and registered in CF. what I am trying to do is the follows <CFQUERY NAME="placed_jobs" DATASOURCE="placments"> select media_cost,transaction_fee,post_type,Job_Ref,company_id,Purchased_for,Positi on_Title,PO_number,Date_placed,company_Contact,tranaction from placements where company_id in (select id from USERS where referral_is = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="#session.referral_id#">) order by Date_placed,company_id </CFQUERY> the issue is that the USERS table is in the database users. Any help would be great. Matthew Friedman


Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference