Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Is there a CASE statement in PL/SQL?
PL/SQL & Pro*C Programmers,
I have an application that runs against SQLServer, SQLBase and Oracle. I have been using PL/SQL to write Oracle functions equivalent to those we use in SQLBase and SQLServer.
I wonder if there is a PL/SQL equivalent of the SELECT CASE statement to replace all the ELSE IFs as shown in the function below?
Also, is it viable and/or worthwhile to write these functions in PRO*C?
Thanks in advance for any advice!
Jonathan A
London, UK
CREATE OR REPLACE FUNCTION WEEKBEG (indate DATE) RETURN DATE IS
day_number INTEGER;
minus_days INTEGER;
BEGIN
--