-
Select Syntax
Hi, I need to select from a table where columnA and columnB is not part of columnC and columnD of another table.
Please advise.
Thanks
Mr.Koopman, thanks for the quick reply.
I have in table1, records with 2 columns -
4,2
1,4
4,5
7,3
and table2, records with 2 columns-
1,3
1,2
1,4
7,2
I need to produce all records from table1 as such:
4,2
4,5
7,3
record # 2 with 1,4 is not selected becuase it matches with one in table2
Last edited by maxwcc; 01-19-2004 at 07:02 PM.
-
Oracle solution:
NOTE: you have not given the join criteria for a_table and another_table so you will have to put that part in the SQL.
select a_table.*
from a_table, another_table
where instr(columnC,columnA) = 0
and instr(columnC,columnB) = 0
and instr(columnD,columnA) = 0
and instr(columnD,columnB) = 0
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|