Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Conditional execution of a select statement
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.
Received on Mon May 08 2000 - 00:00:00 CDT