Executing Script with Multiple Blanks Lines Results in Error ORA-00900 "Invalid sql statment"
(Doc ID 432973.1)
Last updated on JUNE 28, 2013
Applies to:SQL*Plus - Version 18.104.22.168 and later
Information in this document applies to any platform.
Checked for Relevance 28-Jun-2013.
Executing a SQL script containing multiple blank lines between SQL statements fails with error:
ORA 00900: "invalid SQL statement."
This is usually seen when a View's definition is extracted from database using DBMS_METADAT package. The script file which contains extracted (DDL), contain blank lines.
For example consider the following statement to extract view definition and spool it to file:
Select dbms_metadata.get_ddl('VIEW','EMPVIEW','SCOTT') from dual;
This will show view definition for empview captured in a spooled file.
Create or Replace Force view "scott"."empview" ("empno","ename") as
Note: There are blank lines between empno and ename and between ename and from keyword. There could be various reasons for these blank lines.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!