From Sameer_Ghadge@Syntelinc.com Tue, 29 Jan 2002 21:44:21 -0800
From: "Ghadge,Sameer" <Sameer_Ghadge@Syntelinc.com>
Date: Tue, 29 Jan 2002 21:44:21 -0800
Subject: CASE statement
Message-ID: <F001.003FFED3.20020129213018@fatcity.com>
MIME-Version: 1.0
Content-Type: text/plain


hi,
 Oracle 8.1.6 supports the embedded CASE operator
in an SQL statement.

But when i use it inside cursor, it gives error
PLS-00103: Encountered the symbol "CASE" when expecting one of the
following:

e.g.
declare
cursor c is select ename ,
   case when deptno = 10 then
           'TEN'
        when deptno = 20 then
           'TWENTY'
        else
           'other'         
        end dept   
ename from emp ;
begin
for r in c loop
 dbms_output.put_line('Name :'|| r.ename);
end loop;
end
/

So that means we cannot use CASE in cursor ???
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Ghadge,Sameer
  INET: Sameer_Ghadge@Syntelinc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




