Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Update statement with case statement

balajiJan 13 2012 — edited Jan 13 2012
Hi
The following code is thorwing an error like
=====CODE==========
BEGIN
UPDATE emp SET SAL = CASE
WHEN ENAME = 'SCOTT' THEN SAL = 300
ELSE NULL;
END CASE;
END;
=====ERROR=======
ORA-06550: line 3, column 32:
PL/SQL: ORA-00905: missing keyword
ORA-06550: line 2, column 2:
PL/SQL: SQL Statement ignored
ORA-06550: line 5, column 6:
PLS-00103: Encountered the symbol "CASE" when expecting one of the following:

; 1.
2. BEGIN
3. UPDATE emp SET SAL = CASE
4. WHEN ENAME = 'SCOTT' THEN SAL = 300
5. ELSE NULL;


Any suggession?
Regards
Balaji
This post has been answered by Rod West on Jan 13 2012
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Feb 10 2012
Added on Jan 13 2012
4 comments
2,566 views