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

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query Help please

Re: SQL Query Help please

From: <maxmike_at_ibx.bc.ca>
Date: Mon, 19 Oct 1998 18:21:52 GMT
Message-ID: <70g000$o75$1@nnrp1.dejanews.com>


In article <908670849.1111.0.nnrp-03.c2de4f17_at_news.demon.co.uk>,   "MUJAHID HAMID" <mujahid_at_pharmco.demon.co.uk> wrote:
> Dear All,
>
> I have the following select:
>
> Select account_no from table1
> where account_no not in (select account_no from table2).
>
> I am trying to say that give me the account_no's in table1 that are not in
> table2.
>
> In the result I do not get any rows back and I know for a fact that there
> are rows in table1 that are not in table2.
> (Table2 has more rows than table1)
>

Obviously your query should work - I suspect that you might be using a different char() descriptor in each account_no: cannot compare char() and varchar(); char is particularly nasty because it's fixed length and will compare only if fully expanded.

> Thanks in advance
> mujahid_at_pharmco.demon.co.uk
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Oct 19 1998 - 13:21:52 CDT

Original text of this message

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