Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00923 FROM keyword not found where expected

S4meerApr 13 2017 — edited Apr 13 2017

Hi,

The below SQL statement used to work and was created by my predecessor:

SELECT *, PA# as "xreftype", UPRN as "xrefuprn", CROSS_REFERENCE as "xref" FROM PD_APPLICATION_REFERENCES;

It's quite basic as you can see.

The server, where the above statement is being ran from, had Oracle 9.2 client installed. I've installed the 12c client because our Oracle Db was upgraded from 11g to 12c.

This morning I got a failure when that SQL statement was running as shown below:

"ERROR: ORA-00923: FROM keyword not found where expected"

So I decided to use SQL Developer tool to check the statement and same thing.

I've carried out some google search on this subject and found the following article:

ORA-00923: FROM keyword not found where expected tips

I actually could not find any mistake because it was working before so I thought maybe the 12c has obviously something to do with it.

I changed the statement to:

SELECT a.*, PA# as "xreftype", UPRN as "xrefuprn", CROSS_REFERENCE as "xref" FROM PD_APPLICATION_REFERENCES a;

So this time it worked and for some reason I'm thinking that the "*," could be the issue.

My question is how come it worked?

I know that I've found my own resolution for it but I need know what is happening which is even more important to me.

Many thanks for your assistance in advance.

Sameer

This post has been answered by AndrewSayer on Apr 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2017
Added on Apr 13 2017
7 comments
1,189 views