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

something like an If statement

From: Alex Schatten <alex.schatten_at_gmx.de>
Date: Thu, 5 Feb 2004 21:42:50 +0100
Message-ID: <bvu9s9$udf$06$1@news.t-online.com>


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 Received on Thu Feb 05 2004 - 14:42:50 CST

Original text of this message

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