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: Strange Operator in SQL Statement

Re: Strange Operator in SQL Statement

From: Frank Piron <empty_at_zero.nil>
Date: Thu, 07 Oct 2004 15:40:24 +0200
Message-ID: <opsfh5lmylm0et4w@news.online.de>


7 Oct 2004 06:00:44 -0700 Chris Gidman <cjgidman_at_yahoo.com>:

> I'm supporting an application having it's database in Oracle 8.1.7.4
> I found a view that has the following conditional in the WHERE clause:
>
> TABLE1.FIELD_FK =+ TABLE2.FIELD_PK
Since Oracle SQL is format free, your conditional is interpreted by the Parser as

   TABLE1.FIELD_FK = +TABLE2.FIELD_PK So the "+" acts as a unary arithmetic operation which is in fact identity.

    2 = +2

Consider

   TABLE1.FIELD_FK =- TABLE2.FIELD_PK which would also be syntactically correct, but yields all rows with

   TABLE1.FIELD_FK = TABLE2.FIELD_PK = 0 Frank Piron Received on Thu Oct 07 2004 - 08:40:24 CDT

Original text of this message

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