SandPiper
SandPiper

Reputation: 2906

Why does SET LINESIZE not work in my script?

I have a script saved in a file: QUERY.sql. Inside the file, I have the following lines at the top:

SET SERVEROUT ON SIZE 1000000;
SET ECHO OFF;
SET LINESIZE 4000;
SET PAUSE OFF;
SET VERIFY OFF;

Whenever I run the script from the command window using @QUERY, the script runs mostly right, except the linesize is still at the default and it cuts off the data into a new line. The lines are being formatted for entry in another system, so I can't change their formats.

In order to make it work, I have to manually enter SET LINESIZE 4000; in the command window, then run my query. It is mildly annoying to me, but I am worried other users won't know how to get around the problem. What am I missing here?

Upvotes: 0

Views: 3562

Answers (1)

tbone
tbone

Reputation: 15473

For the SQLPlus commands at the top of the script, try dropping the semicolons

SET SERVEROUT ON SIZE 1000000
SET ECHO OFF
SET LINESIZE 4000
SET PAUSE OFF
SET VERIFY OFF

Heres the SET command reference list for anyone looking for it

Upvotes: 1

Related Questions