Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> SQL Question

SQL Question

From: lerobe - Lee Robertson <LEROBE_at_acxiom.co.uk>
Date: Wed, 24 Jan 2001 14:08:01 -0000
Message-Id: <10751.127357@fatcity.com>


All,  

As you have probably guessed by now, my SQL isn't the srongest so I would appreciate some help if you could.  

Two tables  

Table A



CUST_KEY
SOURCE_CODE
DATE_OBTAINED
THIRD_PARTY
plus other columns  

Table B



CUST_KEY
HOUSE_KEY
other columns.  

What I need to do is find all rows in Table A where columns 2,3 and 4 have the same value (col 1 can be different) and then link to table B and join with cust key to find out which rows have distinct house_keys.  

Data Example  

Table A  

Col1       Col2       Col3       Col4
1            3            3            4
2            3            2            4
3            3            2            4
4            4            4            4
5            5            4            3
6            5            4            3                          in this
example I would only require rows 2 and 3, and 5 and 6.  

Any ideas (other than me going on an SQL writing course !!!).  

Regards  

Lee Robertson
Acxiom
Tel: 0191 525 7344
Fax: 0191 525 7007
Email: lerobe_at_acxiom.co.uk  

The information contained in this communication is confidential, is intended only for the use of the recipient named above, and may be legally privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please re-send this communication to the sender and delete the original message or any copy of it from your computer Received on Wed Jan 24 2001 - 08:08:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US