Print command blank line (merged) [message #430104] |
Sun, 08 November 2009 06:29 |
bigb12345
Messages: 2 Registered: November 2009
|
Junior Member |
|
|
Hello,
I am trying to spool some info using variable & print command. but print command is introducing extra blank line. how to handle this.
e.g.
set verify off
set echo off
set pause off
set heading off
set feedback off
set trimout on
set trimspool on
set linesize 10000
set newpage NONE
set pagesize 0
set space 0
set arraysize 2000
set termout off
spool c:\test.txt
variable v_line_0 VARCHAR2(250);
exec :v_line_0 := '<?xml version="1.0" encoding="ISO-8859-1" ?>';
--
variable v_line_1 VARCHAR2(50);
exec :v_line_1 := 'Test-1';
--
variable v_line_2 VARCHAR2(50);
exec :v_line_2 := 'Test-2';
--
print :v_line_0;
print :v_line_1;
print :v_line_2;
select 'x' from dual;
select 'x' from dual;
spool off;
---->Output
<?xml version="1.0" encoding="ISO-8859-1" ?>
Test-1
Test-2
x
x
----->Should be
<?xml version="1.0" encoding="ISO-8859-1" ?>
Test-1
Test-2
x
x
Thanks
Santosh
|
|
|
|
|
Re: Print command blank line (merged) [message #430113 is a reply to message #430109] |
Sun, 08 November 2009 08:58 |
|
Michel Cadot
Messages: 68718 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Quote:this is one of solution but I do have arround 20 variables.
And it is a big work to write
select :myvar from dual
instead of
print myvar
doesn't it?
Quote:is there any way by which we can remove this blank line from print command. any set option in sqlplus.
No.
Regards
Michel
|
|
|