Post the code you tried yesterday and we'll have a look.

------------------------------------------------------------------ 
Andrew Ewings
Project Manager
Thoughtbubble Ltd 
http://www.thoughtbubble.net 
------------------------------------------------------------------ 
United Kingdom 
http://www.thoughtbubble.co.uk/ 
Tel: +44 (0) 20 7387 8890 
------------------------------------------------------------------ 
New Zealand 
http://www.thoughtbubble.co.nz/ 
Tel: +64 (0) 9 488 9131
------------------------------------------------------------------ 
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890. 



-----Original Message-----
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: 16 May 2001 12:32
To: CF-Talk
Subject: RE: SQL Joins.


Can I do a "select * from company_table" then join it to the slow, medium
and fast tables ?
I tried something similar using both inner , outer and full joins yesterday
and kep being told that it could not find some of the fields.


-----Original Message-----
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: 15 May 2001 18:04
To: CF-Talk
Subject: RE: SQL Joins.


I think you need something along the lines of:

Select fieldlist
FROM company_table INNER JOIN slow_stream ON company_table.Name =
slow_stream.company_name
INNER JOIN medium_stream ON company_table.Name = medium_stream.company_name
INNER JOIN fast_stream ON company_table.Name = fast_stream.company_name

Note that that will only return records if there is a match between all 4
tables.  if you want to return all records from the company_table,
regardless of whether there is a match in the other tables, you'd use:

Select fieldlist
FROM company_table LEFT OUTER JOIN slow_stream ON company_table.Name =
slow_stream.company_name
LEFT OUTER JOIN medium_stream ON company_table.Name =
medium_stream.company_name
LEFT OUTER JOIN fast_stream ON company_table.Name = fast_stream.company_name

HTH,
Bob

-----Original Message-----
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: May 15, 2001 12:09 PM
To: CF-Talk
Subject: SQL Joins.


Hello folks,

I ma having a spot of bother with joining tables in a query and could do
with some advice.

There are 4 tables:  company_table, slow_stream, medium_stream and
fast_stream

Company table holds: company ID, name.

The other tables also have a company_name field.

I want to join all the tables together on the name field to give me one
virtual table.

What is the best way to go about this,  I have tried in a number of ways.

Darren Adams
Web Developer
Marketing Department
Systems Union

Office: 01252 55 6220
Mobile: 07714 817 038
Email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to