Need help forming a query
From: Jim West <P3C2_at_jameswest.com>
Date: Thu, 18 Nov 1999 15:16:09 GMT
Message-ID: <ch583ss0m5c4svjisnp6l3i1mgmro41t3f_at_4ax.com>
[Quoted] Howdy all,
Date: Thu, 18 Nov 1999 15:16:09 GMT
Message-ID: <ch583ss0m5c4svjisnp6l3i1mgmro41t3f_at_4ax.com>
[Quoted] Howdy all,
Ok, here is what I'm trying to accomplish.
I have a table called SWITCHINFO that contains a column called NAME and a column called INCLUDE. There are other columns as well. NAME is varchar2(4) and INCLUDE is varchar2(1). INCLUDE values are either a 'Y' or 'N'.
I have another table called COUNTS that has columns for various count information as well a column called SWITCHID.
I need to be able to query the COUNTS table and retrieve only those rows whose SWITCH name matches those in the SWITCHINFO table whose INCLUDE value is 'Y'.
How do I do this?
SWITCHINFO:
NAME INCLUDE ----------- ---------------- AAAA Y BBBB N
COUNTS:
SWITCHID COUNT1 COUNT2 COUNT3 ------------------ --------------- -------------- ------ AAAA 10 20 30 BBBB 50 40 30
The query should ONLY return the row containing AAAA from the COUNTS table.
Thanx!! Received on Thu Nov 18 1999 - 16:16:09 CET