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: Bug Report

Re: Bug Report

From: Mark D Powell <markp7832_at_my-deja.com>
Date: Thu, 25 Jan 2001 15:02:04 GMT
Message-ID: <94pf55$fd0$1@nnrp1.deja.com>

In article <3A6FB505.FB0F2B6C_at_exesolutions.com>,   "Daniel A. Morgan" <dmorgan_at_exesolutions.com> wrote:
> I have found in Oracle 8.1.6 that the following code will run in
 PL/SQL
>
> SELECT field1
> FROM table1
> WHERE field1 IN (
> SELECT field1
> FROM table1
> MINUS
> SELECT field1
> FROM table2)
>
> Even if field1 does not exist in table2.
>
> Be very very careful.
>
> Daniel A. Morgan
>

Daniel, I do not understand what you mean by field1 does not exist in table2. Are you saying the column field1 does not exist or the value does not exist?

Since the difference between two queries can be defined as the rows returned by the first query that are not also returned by the second query this would seem to be the correct response if you are talking value. In fact, as written it appears to me that the results of your outer query should match the result of the inner query so why do you even have an outer query? Should one of the table names be different or did you mean to say 'does exist in table2'?

I have had difficulty seeing the obvious before so it is very possible I am missing something here.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com
http://www.deja.com/
Received on Thu Jan 25 2001 - 09:02:04 CST

Original text of this message

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