Re: ORA-00936: missing expression

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Thu, 6 Sep 2001 17:45:37 +0200
Message-ID: <9n85n1$jvs$1_at_s1.read.news.oleane.net>


"Alexander Shuvalov" <saturn_at_hot.ee> a écrit dans le message news: c6f073f6.0109060628.637ac967_at_posting.google.com...
> Hi, all!!!
>
> Why do I get the following error: ORA-00936: missing expression, when
> exectuing this command on Oracle 8.0.5 server? The command is: SELECT
> a.txtcode, b.txtcode FROM W76.TRANSLATION a, DUMP.TRANSLATIONTX b WHERE
> a.origtext = b.trantext AND b.langcode = 'FI' AND (SELECT COUNT(*) FROM
> DUMP.TRANSLATIONTX WHERE langcode = 'EN' AND txtcode = b.txtcode)>0. But
> the same command works fine on ORacle 8.1.6 server!!!
>
> What is the problem here?
>
> TIA
Try:

SELECT
a.txtcode, b.txtcode
FROM (SELECT txtcode, COUNT(*) cnt FROM DUMP.TRANSLATIONTX

      WHERE langcode = 'EN' group by txtcode) c,
     W76.TRANSLATION a, DUMP.TRANSLATIONTX b
WHERE a.origtext = b.trantext AND b.langcode = 'FI'
  AND c.txtcode = b.txtcode
  and c.cnt > 0;
--
Hope this helps
Michel
Received on Thu Sep 06 2001 - 17:45:37 CEST

Original text of this message