I have a table called calendars.
One of its columns is named 'date'
When I want to select the date column it gives error ORA-01747 namely invalid table.column.
select date from calendars
I guess this happens because 'date' is a reserved word for pl/sql. The problem is it's not even possible to change the column name :
alter table calendars rename column date to date_d
Result is: ORA-00904 error: invalid identifier.
What do you advice?
Thanks.
Try escaping the reserved word with double quotes.
Have you tried
If that doesn't work or help, have you tried dropping the column (and maybe try referencing it with the table name prefix:
calendars.date
)?I also found this post: How do I escape a reserved word in Oracle?
It seems that Oracle will be case-sensitive if you use double quotes so
is not the same as
date is a reserved keyword and hence cannot be used like
SELECT date from some table
there can be multiple solutions for the problem