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: Conditional execution of a select statement

Re: Conditional execution of a select statement

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: 2000/05/09
Message-ID: <39180F15.3A0FA0C0@Unforgettable.com>#1/1

russellwright_at_my-deja.com wrote:
>
> In Oracle, how can I write a select statement that is different based on
> the user?
>
> SELECT User INTO sLoggedOnUser FROM Dual;
>
> IF sLoggedOnUser <> 'Admin' THEN
> SELECT ....
> ELSE
> SELECT ....
> END IF;
>
> Seems like it should be simple, but I get errors stating it is expecting
> SELECT INTO.
>
> Do you have to use a cursor for this?
>
> Thanks
>
> Russ
>
> RussellWright_at_earthling.net
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

Would you be willing to use a shell script? Received on Tue May 09 2000 - 00:00:00 CDT

Original text of this message

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