Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Conditional execution of a select statement
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
![]() |
![]() |