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: something like an If statement

Re: something like an If statement

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 05 Feb 2004 13:08:05 -0800
Message-ID: <1076015230.763745@yasure>


Alex Schatten wrote:

> "Bricklen" <bricklen-rem_at_yahoo.comz> schrieb im Newsbeitrag
> news:eZxUb.11178$An3.1496_at_edtnps84...
> ...
>

>>Would the CASE statement be of any use here?
>>What version of Oracle btw?

>
>
> Hello Bricklen
>
> its version 9i
>
> How would you do this with a CASE
> As you see in my example there are more rows possible.
> Afaik i thougt i can retrieve only one record.
> example:
> SELECT CASE
> WHEN (SELECT count(*) FROM Structure WHERE ID = 1000) > 0
> THEN 'yes'
> ELSE 'no'
> END
> AS Test
> from dual
>
> Where now the yes or no is returned must be the union selects from my
> example and this want work.
>
> regards, Alex

http://www.psoug.org/reference/decode_case.html

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Thu Feb 05 2004 - 15:08:05 CST

Original text of this message

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