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: ORA-00920 invalid relational operator

Re: ORA-00920 invalid relational operator

From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 04 Jul 2005 06:12:56 -0700
Message-ID: <1120482793.968344@yasure>


olivier.duhart_at_gmail.com wrote:
>
> Hello evry body
>
> I have a very strange problem, the following query
> raise an exception when executed from Java (JDBC) but is successfully
> executed within TOAD.
>
>
> SELECT e.region, e.subregion, e.holding, e.id, e.deleted,
> e.id_mergefile id_frf, t.sizeclass, t.subdivision
> FROM r1_typology t, r1_farmreturn_entry e
> WHERE id_entry = id AND id_mergefile=1392 AND id_basefile IS NOT NULL
> AND t.sgmversion = 1996 AND t.typologyversion = 1996393 AND
> e.region||'.'||e.subregion||'.'||e.holding LIKE '%.24.%' ORDER BY
> e.region, e.subregion, e.holding
>
>
> I guess the problem come from the
> [e.region||'.'||e.subregion||'.'||e.holding LIKE '%.24.%'] part but I
> need it and I don't know how to correct it. Could you help me ?
>
> Olivier

Not sure that that is where the problem is but your statement makes no sense.

You wrote:
AND e.region||'.'||e.subregion||'.'||e.holding LIKE '%.24.%'

but the region and holding are ignored. Why not just '.'||e.subregion||'.' LIKE '%.24.%'
it accomplishes the same thing with less work.

BTW: Version information is important and why are you hard coding sgmversion and typologyversion?

-- 
Daniel A. Morgan
http://www.psoug.org
damorgan_at_x.washington.edu
(replace x with u to respond)
Received on Mon Jul 04 2005 - 08:12:56 CDT

Original text of this message

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