Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> case when ... then expression
Hi,
How can I use the CASE WHEN ... THEN expression in a PL/SQL block ?
I'v the following statement:
INSERT INTO table(id, word) VALUES (ID, CASE WHEN x>1 THEN 'Word1' WHEN x>2
THEN 'Word2' ELSE 'Word3' END);
This statement works on command line but it doesn't in a PL/SQL block or in
a stored procedure.
Can somebody help me ?
Thanks
nunch Received on Mon Jun 25 2001 - 13:46:00 CDT
![]() |
![]() |