tags:

views:

62

answers:

1

This is the command,i am using in ORACLE 9i.

SELECT TO_CHAR(SYSDATE,'DD-MON-YYYY') Date FROM DUAL;

It gives an error "FROM keyword not found,Expected" ,where Date is an ALIAS,but when i enclosed Date in "Date" double quotes like this ,it is taking it as an Alias and output is right.

Please SUGGEST!!!

+3  A: 

Probably caused because Date is a reserved word in Oracle,

SELECT *
FROM v$reserved_words
where keyword = 'DATE'

Putting the '' around it "escapes" it so it can be used.

carpenteri