You have to do a join on the tables...something like:

select * from tablea left join tableb on tabea.id=tableb.id where ...

That's the general idea.  There are several join types (dependent on your
database platform) and you would also not usually use a wildcard (*) but
instead use the field names that you want to retrieve.

There's some very good SQL information on line at www.swynk.com

HTH,

Howie

----- Original Message -----
From: Chris Giminez <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, April 30, 2000 4:23 PM
Subject: tying two tables


> Sorry if this is a lame question. I'm not very strong in SQL yet and am
having a brain freeze on how
> to do this.
>
> I have table A where I pull one record. In this one record are name ID's
that correspond to table B
> where the name ID's are associated with full name, email, phone, etc.
>
> How do I post information of each name id from table A as the full name,
email, phone, etc from
> table B
>
>
> I will display something like this
>
> <cfoutput>
> #tablea.data1#
> #tablea.data2#
> #tablea.data3#
> #tablea.data4#
> #tablea.data_name_id1# (but here is where I don't want the Id, I want the
info from table B)
> #tablea.data_name_id2# (same goes here)
>
> </cfoutput>
>
>
> thanks
>
>
> Chris Giminez
> Owner - Cyber Scriber Web Site Design
> 831-728-4469
> ICQ# 2628000
>
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to