Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> case when ... then expression

case when ... then expression

From: Nicolas MUGNIER <nunch_at_free.fr>
Date: Mon, 25 Jun 2001 18:46:00 GMT
Message-ID: <IFLZ6.2240$_z5.1737748@nnrp5.proxad.net>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US