Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Query Help please
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