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: Bricklen <bricklen-rem_at_yahoo.comz>
Date: Thu, 05 Feb 2004 20:47:06 GMT
Message-ID: <eZxUb.11178$An3.1496@edtnps84>


Alex Schatten wrote:

> Hi,
>
> following is used in Sybase and in MsSqlserver for a jsp. Frontend to build
> different menu structures.
> Is there any simple way to translate this to pl/sql
>
> IF (SELECT count(*) FROM Structure WHERE ID = 1000) = 0
> BEGIN
> select 'File', 1
> union
> select 'Menu 2', 2
> union
> select 'Menu 3', 3
> ...
> order by 2
> END
> ELSE
> BEGIN
> select 'Menu 11', 1
> union
> select 'Menu 12', 2
> union
> select 'Menu 13', 3
> ...
>
> order by 2
> END
>
> Regards, Alex
>
>

Would the CASE statement be of any use here? What version of Oracle btw? Received on Thu Feb 05 2004 - 14:47:06 CST

Original text of this message

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