Skip to Main Content

Oracle Database Discussions

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!

Additional new lines in SQL script file and problem with SQL*Plus

dariyooshNov 22 2009 — edited Nov 22 2009
Dear all,


I would like to ask a question about new line characters inside SQL file scripts. I have a very long SQL query saved in a txt file (ANSI coding). Because the query statements are very long (many table joins and WHERE conditions) I tried to separate the FROM, WHERE and ORDER BY clauses by inserting several new lines characters (just hitting the Enter) among them to improve the clarity of the source code. Now the problem is, whenever these new line characters are inserted into the file, apparently SQL*Plus can no more parse the file properly and gives me the following error message:
SP2-0042: unknown command "FROM" - rest of line ignored.
SP2-0734: unknown command beginning "myenterpri..." - rest of line ignored.
The problem is definitely related to these new line characters because when I remove them, the scripts runs without any problem. I would appreciate if you could kindly guide me how should I deal with this problem. Is there any SQL*Plus command to run in order to interpret new line characters correctly?


Thanks in advance,


Kind Regards,
Dariyoosh
This post has been answered by Frank Kulash on Nov 22 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 20 2009
Added on Nov 22 2009
5 comments
2,213 views