Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 19th, 2003, 02:02 AM
sankarm sankarm is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 sankarm User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Too many blank lines in output

Hi,

I have appended the script that I am excuting and the input from the table where I am extracting the data.

Here is the problem. The output file has one entry, many blanklines and then the second entry many blank lines and so on. How can I get rid of the empty lines?

Any help would be greatly appreciated.

Script:
=====

#!/bin/ksh


NLS_LANG="American_America.WE8ISO8859P1"
SOURCE_DIR="/home/dbguy/dinit"
COMP_DEL_FILE="c_delimited_file"
ADDR_DEL_FILE="a_delimited_file"
export NLS_LANG


/home/dbguy/sqlplus -s uid/pwd@dbname << !EOF
SET NEWPAGE NONE
SET SPACE 0
SET LINESIZE 3000
SET PAGESIZE 0
SET ECHO OFF
SET FEEDBACK OFF
SET HEADING OFF
SET MARKUP HTML OFF

UPDATE IFACE_COM SET
CFLAG = 'Z'
WHERE CFLAG = 'N';

UPDATE IFACE_ADD SET
AFLAG = 'Z'
WHERE AFLAG = 'N';

spool $SOURCE_DIR/$C_DEL_FILE

SELECT OLD_CID || '|' || NEW_CID
FROM IFACE_COM
WHERE CFLAG = 'Z';

spool off

spool $SOURCE_DIR/$A_DEL_FILE

SELECT OLD_AID || '|' || NEW_AID
FROM IFACE_ADD
WHERE AFLAG = 'Z';

spool off

UPDATE IFACE_COMPANY SET
CFLAG = 'Y',
LAST_MODIFIED_DT = SYSDATE
WHERE CFLAG = 'Z';

UPDATE IFACE_ADDRESS SET
AFLAG = 'Y',
LAST_MODIFIED_DT = SYSDATE
WHERE AFLAG = 'Z';

COMMIT;

EXIT




Data:
====

Select * from iface_com ;

EVENT_ID OLD_CID NEW_CID C CREATION_DATE LAST_MODIFIED_D
---------- ------------------------- ------------------------- - --------------- ---------------
10 ABC ABCO Y 16-NOV-03 18-NOV-03
15 DEF DEFO Y 16-NOV-03 18-NOV-03
10 XXX XXX1 Y 16-NOV-03 18-NOV-03
11 YYY XXX1 Y 16-NOV-03 18-NOV-03
12 AAA XXX1 Y 16-NOV-03 18-NOV-03
13 BBB XXX1 Y 16-NOV-03 18-NOV-03
14 CCC XXX1 Y 16-NOV-03 18-NOV-03
15 DDD XXX1 Y 16-NOV-03 18-NOV-03
16 EEE XXX1 Y 16-NOV-03 18-NOV-03
17 FFF XXX1 Y 16-NOV-03 18-NOV-03
18 GGG XXX1 Y 16-NOV-03 17-NOV-03
19 HHH XXX1 Y 16-NOV-03 18-NOV-03
20 III XXX1 Y 16-NOV-03 18-NOV-03
30 JJJ XXX1 Y 16-NOV-03 18-NOV-03
40 KKK XXX1 Y 16-NOV-03 17-NOV-03
50 LLL XXX1 Y 16-NOV-03 18-NOV-03
60 MMM XXX1 Y 16-NOV-03 18-NOV-03
70 NNN XXX1 Y 16-NOV-03 18-NOV-03

Note : This is the data after the script was executed.



Thanks,
Sankar.

Reply With Quote
  #2  
Old May 12th, 2004, 04:22 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Too many blank lines in output

try
SET TRIMSPOOL ON


works for me

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Too many blank lines in output


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway