Home » SQL & PL/SQL » SQL & PL/SQL » camn we use 2 instances of set linesize (oracle 8i)
camn we use 2 instances of set linesize [message #318205] Tue, 06 May 2008 02:02 Go to next message
melvinRav
Messages: 43
Registered: April 2008
Location: India
Member
hello ppl

I have the following script , that generates a csv file

SET NEWPAGE 0
SET SPACE 0
SET LINESIZE 135
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF

spool c:\test.csv
SELECT 'Date'||','||'Distributer Code'||','||'Customer Code'||','||'Product Code'||','||'Sales Units'
from dual
union all
select
set linesize 90 ----can i put the set set line size here
/
spool off

The problem i am facing is that when i open the csv in notepad there is a blank line between the headings ,
this because the size of the heading followed by the data , is of less size ,

can i reduce the linesize in the script , just after
"SELECT 'Date'||','||'Distributer Code'||','||'Customer Code'||','||'Product Code'||','||'Sales Units'
from dual"
but when i tried it its of no avail

can anybosy please help out
Re: camn we use 2 instances of set linesize [message #318209 is a reply to message #318205] Tue, 06 May 2008 02:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1/ When you use "select union all select" you don't know in which order the rows will be displayed and so your heading may not be where you think. Use prompt to display your heading

2/ I don't see where is the problem, if you set your linesize to the greatest size

3/ Remove "automatically fold at end of line" (wild translation from french version) option of your notepad.

4/ Have a look at "set trimout" and "set trimspool" if your purpose is to avoid ending blanks

Regards
Michel
Re: camn we use 2 instances of set linesize [message #318211 is a reply to message #318209] Tue, 06 May 2008 02:13 Go to previous messageGo to next message
pablolee
Messages: 2834
Registered: May 2007
Location: Scotland
Senior Member
Quote:
3/ Remove "automatically fold at end of line" (wild translation from french version) option of your notepad.


That would be 'Word Wrap' in the Format menu in 'my' version.
Re: camn we use 2 instances of set linesize [message #318685] Wed, 07 May 2008 10:06 Go to previous message
melvinRav
Messages: 43
Registered: April 2008
Location: India
Member
Thanks a lot for the replies
Previous Topic: capturing user details
Next Topic: Tablespaces memory structure
Goto Forum:
  


Current Time: Sun Dec 04 00:38:45 CST 2016

Total time taken to generate the page: 0.08832 seconds