You folks are probably going to laugh at how trivial this one is. However, Google searches have not presented me with any sufficient answers, so the question may deserve a place here.
I've got the following query:
select '1969' from dual;
But, what if I want to alias the column with a reserved keyword? For example (This doesn't work):
select '1969' as date from dual;
'date' is a type, and Oracle doesn't like this.
I've tried the following to no avail:
select '1969' as date from dual;
select '1969' as 'date' from dual;
select '1969' as `date` from dual;
select '1969' date from dual;
select '1969' 'date' from dual;
select '1969' `date` from dual;
The error is informative when getting an understanding of Oracle's order of interpreting tokens in the statement, but is not alias related.
ORA-00923: FROM keyword not found where expected
00923. 00000 - "FROM keyword not found where expected"
I'm sure this is incredibly easy. Easy rep for someone!
I'm just a monkey with a keyboard.