WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2004, 02:36 AM
WebProWorld New Member
 

Join Date: Apr 2004
Posts: 1
thousandfive RepRank 0
Default Retriving matching list of data from two database

Hi
Team,

I have problem in retriveing matches data from two data base.I m using coldfusion MX .Databases are access and sql.

This is my example coding

<cfquery name="test" datasource="db1">
Select call_key,description from db1
</cfquery>

<cfquery name="test1" datasource="db2">
Select cso,model from db2
</cfquery>

So far it is working.

Problem started here.

I want to retrive those records from two database where call_key and cso are matching.

<cfquery dbtype="query name="result">
Select test.*,test1.* from test,test1 inner join test
where test.call_key=test.cso
</cfquery>


Above coding is not working..
Error .

Query Of Queries syntax error.
Encountered "inner


Do you have any idea of this?Any alternative ways?

thank you

five
Reply With Quote
  #2 (permalink)  
Old 04-30-2004, 11:31 AM
WebProWorld Member
 

Join Date: Apr 2004
Location: Vancouver Canada
Posts: 35
bMind RepRank 0
Default

I dont work with access, but in mySQL, it would look like this...

Code:
Select t.call_key,t1.cso FROM test t LEFT JOIN test1 t1 ON t.call_key=t1.cso
Try this..

Code:
Select test.*,test1.* from test inner join test1
where test.call_key=test1.cso
They have the same concept, you just have to play around a lil.

Hope that helps
__________________
-----------------------

MyDotCa.ca - Add your Canadian DotCa site

| Making Canadian Stronger |

-----------------------
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum
Tags: , , , , ,



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Search Engine Optimization by vBSEO 3.2.0