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-00936

Re: ORA-00936

From: Daniel Morgan <dmorgan_at_exesolutions.com>
Date: Mon, 26 Aug 2002 15:10:10 GMT
Message-ID: <3D6A44BD.E60D3A20@exesolutions.com>


Isabell wrote:

> Hi,
>
> if I try to execute this SQL-Statement I get the ERROR "Ausdruck fehlt".
> I don`t know what is wrong in this Statement, please help me.
>
> SELECT COUNT(*) AS RECCOUNT FROM
> N_VORGANG,
> N_VORGBETEILIGTE,
> N_ADRESSEN,
> N_BETEILIGTENARTEN,
> N_PERSONENDATEN,
> BERE
> WHERE N_VORGANG.VORGANGSNUMMER=N_VORGBETEILIGTE.VORGANG
> AND N_VORGBETEILIGTE.ADRESSE=N_ADRESSEN.ADRESSNUMMER
> AND N_ADRESSEN.ADRESSNUMMER=N_PERSONENDATEN.ZUORDNUNGSNUMMER (+)
> AND N_ADRESSEN.ADRESSNUMMER= N_BANKVERBINDUNGEN.ZUORDNUNGSNUMMER (+)
> AND N_VORGBETEILIGTE.BETEILIGTENART=N_BETEILIGTENARTEN.BETNUMMER
> AND N_VORGANG.BEREICH=BERE.BRS AND N_VORGANG.MUENDELNR_ALT = HEBUCH.MNR
> AND (+)N_VORGANG.BEREICH = HEBUCH.BEREICH AND BETEILIGTENART=7
> AND N_VORGANG.BEREICH BETWEEN '2000' AND '2100' AND 1=2
> AND (GEBURTSDATUM IS NULL OR GEBURTSDATUM <= ('26.08.2002'))

My only German is from chem and that was decades ago but there are a few things that strike me about your SQL statement.

  1. one will never equal 2 so your query will never return any records
  2. ('26.08.2002') should be rewritten as TO_DATE('26.08.2002')

But I suspect the real reason is the outer-joins. Convert them to inner joins And then reintroduce them one at a time.

Daniel Morgan Received on Mon Aug 26 2002 - 10:10:10 CDT

Original text of this message

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