Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: something like an If statement
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
![]() |
![]() |