Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: IF NOT EXISTS SELECT ...

Re: IF NOT EXISTS SELECT ...

From: <pcollard_at_lehman.com>
Date: 1996/10/22
Message-ID: <NEWTNews.845983828.16374.pcollard@lonadmine169>#1/1

Try using Sybase - no problems except your open brachet should be after the exists!

In Article<53vsnr$7uf_at_newstoo.ericsson.se>, <eraarm_at_hfera.ericsson.se> writes:
> Path:

lonweb.lehman.com!news.lehman.com!uunet!in3.uu.net!news.mathworks.com!EU.net!No rway.EU.net!sn.no!newsfeed.tip.net!news.seinf.abb.se!erinews.ericsson.se!news
> From: eraarm_at_hfera.ericsson.se (Armin S. Seidel LK/NKG)
> I would like to test the existence of rows as condition
> in a PL/SQL if-clause:
> IF NOT (EXISTS SELECT * FROM table WHERE col = value) THEN
> ...
> END IF;
>
> but Oracle complains about the syntax. I tried different variations
> with/without parentheses without success.
> Apparently, the EXISTS operator may only be used in subqueries.
> Can you help?


Peter Collard			Please note that I am a contractor
Senior DBA			so these are my own views and
Lehman Bros			may not coincide with those of
London				Lehman Bros.
==================================================================
Received on Tue Oct 22 1996 - 00:00:00 CDT

Original text of this message

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