If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Lookup within a lookup?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-05-04, 10:31
DataWho DataWho is offline
Registered User
 
Join Date: Oct 2002
Posts: 24
Question Lookup within a lookup?

Hi Folks!

I've got a problem here, with MySQL 3.23

I'm trying to create a master query that will bring up a recordset based on 2 things. There are 2 tables, category and ccontrib.

`category` simply has a catcode and a contcode field. catcode is a string and contcode is a number. i.e.

catcode|contcode
1BTYH|1010670
1MB O|1010670
1BTYH|1010672
1MB V|1010672
1BTYH|1010675
1MB P|1010675


`ccontrib` holds all of the individual record's contact info. This also has a contcode field related to the catcode table. i.e.

contcode|busname|fname
1010670|SBC|Fred
1010672|SBC|Wilma
1010675|EC Inc.|Barney

What I need to do here is get a master recordset that has all of the contact info from ccontrib, but not showing any of them that have a '1MB O' value from category. In the above case, I would want the recordset to only show 1010672 and 1010675 in the results. If someone has an idea or a question I'll elaborate if need be!

Thanks folks!
-DW
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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