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

Home -> Community -> Usenet -> c.d.o.misc -> "CASE when" strange

"CASE when" strange

From: <web_poster03_at_yahoo.com>
Date: 20 May 2005 07:52:10 -0700
Message-ID: <1116600730.649008.103700@f14g2000cwb.googlegroups.com>


The following 2 queries are different only w/ or w/o "as 'test'".

Oracle server and client info:
SQL*Plus: Release 9.2.0.1.0 - Production on Fri May 20 10:44:37 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production With the Partitioning, Oracle Label Security, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> select case when sysdate is null then 'nulldate'   2 else to_char(sysdate) end as 'test'   3 from dual;
else sysdate end as 'test'

                    *

ERROR at line 2:
ORA-00923: FROM keyword not found where expected

  1 select case when sysdate is null then 'nulldate'   2 else to_char(sysdate) end
  3* from dual
SQL> / CASEWHENS



20-MAY-05 Received on Fri May 20 2005 - 09:52:10 CDT

Original text of this message

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