Wednesday, April 9, 2008

Tip#11 SQL*Plus - Ignore Blank Lines in the Script

Recently I came across a situation where during our database deploy one of our View script was exiting in SQLplus due to a blank line inside the script. To fix it, we had to set sqlblanllines setting in sqlplus to ignore the blank lines and that did the trick for us.

SQL> create or replace view xx
2 as
3 select
4 sysdate as x
5
SQL> from
SP2-0042: unknown command "from" - rest of line ignored.
SQL> dual
SP2-0042: unknown command "dual" - rest of line ignored.
SQL> set sqlblanklines on
SQL> create or replace view xx
2 as
3 select
4 sysdate as x
5
6 from
7 dual
8 ;

View created.

SQL>

3 comments:

My Thoughts said...

Good work Mehul! Informative tips! Keep up the good work.

Cheers!
Siba

Anonymous said...

I love when there's an easy-to-find post with exactly the info you're looking for. Thanks!

Anonymous said...

it is good to find out that there are as easy as this kind of solution on the internet that solves exactly the problem you're encountering.