Re: SQL - Should produce an error and doesn't, please help.

From: N Prabhakar <prabhs_at_po.pacific.net.sg>
Date: 1996/12/06
Message-ID: <58a5cs$5pl_at_newton.pacific.net.sg>#1/1


Doug Moloney <Doug.Moloney_at_ae.ge.com> wrote:
>SELECT PartNo FROM table_1
> WHERE table1.Partno NOT IN
> (SELECT partno from publicview)
>
>The partno column in publicview is not a valid column name. Oracle
>should give me an error, but instead runs the query and returns no
>results. If I qualify the column as publicview.partno I get the error,
>but I have to qualify it to get the error. Anyone see this before?
>
>Running Oracle 7.2
>
>Please e-mail me directly at
>doug.moloney_at_ae.ge.com
>

Hi there,

It appreas that that publicview is present in the user's schema. It is not referencing from the table which you want. If an object is available under user's schema, Oracle will try to execute that object. Only if it not there, it will look for synonyms.

Issue the following query under user's schema.

select * from user_objects where object_name = 'PUBLICVIEW'.

If you find one, then drop that object and rerun the query. It should be OK,

Regards

N.Prabhakar   Received on Fri Dec 06 1996 - 00:00:00 CET

Original text of this message