ORA-00900 Super Easy Fix (for some cases)

Posted by Bunch on Geeks with Blogs See other posts from Geeks with Blogs or by Bunch
Published on Fri, 13 Apr 2012 14:25:40 GMT Indexed on 2012/04/13 23:31 UTC
Read the original article Hit count: 142

Filed under:

Here is a really easy fix for some ORA-00900 errors. Well at least the one I saw the other day. This was something that I did not come across when searching either. I found lots of other ideas on what the problem might be but not the fix. Since I am fairly new to PL/SQL (TSQL only for a long time) this one stumped me for a while. Until I asked someone and they saw the error in about two seconds.

When using the Command Window to add a view I was receiving an ORA-00900 error. So I checked that everything the view was referencing was there and that the permissions looked OK. The code for the view was fairly simple and it ran just fine in a regular SQL Window. It ended up that the Command Window did not like the space I had between the list of items in the select before the from.

Bad:

col1,
col2,
                               <--- does not like the empty line
from tblSomething

Good:

col1,
col2,
from tblSomething

I will just chalk that up to my familiarity with PL/SQL.

Tags:

© Geeks with Blogs or respective owner