Oracle 8.0.5 CAST issue

From: Bryan Bible <bbible_at_vignette.com>
Date: 2000/08/04
Message-ID: <398B18B6.855DC227_at_vignette.com>#1/1


All,

Hopefully someone can help me with this. The following is a SQL select statement that works with 8.1.5 but errors with 8.0.5. I assume that the CAST keyword is the issue. Here is the SQL statement and schema:

Schema:
Name
----------------------------- -------- ------------------------

NEW_PRICE                                    NUMBER(10,2)
OLD_PRICE                                     NUMBER(10,2)


8.1.5 -
SQL> select cast (((new_price - old_price) / old_price) * 100 as number(20,2)) pct_change from test_table;

PCT_CHANGE



-10
-24.6
-9.71
-30.8
-9.09

8.0.5 -
SQL> select cast (((new_price - old_price) / old_price) * 100 as number(20,2)) pct_change from test_table;

select cast (((new_price - old_price) / old_price) * 100 as number(20,2)) pct_change from test_table

*
ERROR at line 1:
ORA-00905: missing keyword

SQL> Please help! I am assuming that CAST has a different syntax in 8.0.5. but I cannot determine what it is!

Thanks,

Bryan Bible Received on Fri Aug 04 2000 - 00:00:00 CEST

Original text of this message