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

Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT Join question

Re: URGENT Join question

From: mark <mark_brehmen_at_yahoo.com>
Date: 9 Aug 2001 01:23:51 -0700
Message-ID: <fa4781e4.0108090023.898c44e@posting.google.com>

Something wrong in what you are doing.

1.
You seem to be selecting from Table 2 (distinct b.col1,b.col2 ) So you can ***never*** get anything from table 1. So with your query you can never get "HELLO WORLD NOW 1" as the output.

2. What is the output you want?. Be explicit. What is the Distinct for? If you want the rows in Table A not in Table B, then there are quite a few queries posted in this forum which gets the rows not common

debo_nair_at_yahoo.com (Manoj Nair) wrote in message news:<92a0e580.0108081623.e512163_at_posting.google.com>...
> I have 2 tables
>
> Table 1
> col 1 varchar2
> col 2 numeric
>
> Table 2
> col 1 varchar2
> col 2 numric
>
> Table 1 data
> HELLO WORLD 1
> HELLO WORLD NOW 1
>
> Table 2 data
> HELLO WORLD 1
>
> when i run
>
> select distinct b.col1,b.col2 from table2 b , table1 a where b.col1
> <> a.col1 and a.col2 = b.col2 I want no records to be returned
> cos HELLO WORLD is already present in table 1..
>
> however it returns HELLO WORLD NOW 1
>
> Thanks
Received on Thu Aug 09 2001 - 03:23:51 CDT

Original text of this message

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