SQL*Plus error [message #530640] |
Wed, 09 November 2011 08:21 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
julb
Messages: 17 Registered: November 2010
|
Junior Member |
|
|
Hi,
when I try to execute the following script using SQL*Plus
CREATE OR REPLACE FORCE VIEW "VIEW1" ("COLUMN1", "COLUMN2")
AS
SELECT "COLUMN1",
"COLUMN2"
FROM "TABLE1"
WHERE "COLUMN1" > 0;
I got this error -
SQL> @"c:\view1.sql";
SP2-0734: unknown command beginning "WHERE "COL..." - rest of line ignored.
It seems that if I remove the empty line before WHERE, it runs OK. By the way, SQL Developer executes it both ways.
Is there any way to make the original script (with empty line) work with SQL*PLUS?
We have a lot of views and most of them have these empty lines.
|
|
|
|
Re: SQL*Plus error [message #530643 is a reply to message #530640] |
Wed, 09 November 2011 08:32 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
flyboy
Messages: 1903 Registered: November 2006
|
Senior Member |
|
|
julb wrote on Wed, 09 November 2011 15:21Is there any way to make the original script (with empty line) work with SQL*PLUS?
Yes, and fortunately it is shown in SQL*PlusĀ® User's Guide and Reference book, which is available with other Oracle documentation e.g. online on http://tahiti.oracle.com/ I suggest you to consult it. In the described case, the magic command is
|
|
|
|
|
|