Click to See Complete Forum and Search --> : Getting duplicate results in sql plus


ecomajor
03-21-2007, 02:21 PM
I am calling a sqlplus script from within perl and everytime I run it I get duplicate results in the output for instance

I get
trade datet numb
______________
1 38 22

trade datet numb
______________
1 38 22


Here is my sql script
SET TERMOUT OFF
SPOOL PENDING_TRADES.TXT
SET serveroutput ON

COLUMN Count FORMAT A15

select TO_CHAR(count(*)) as Count
from Trade
;
SET LINESIZE 200
COLUMN TRADE FORMAT A15
COLUMN datet FORMAT A15
COLUMN numb FORMAT A25

select trade, datet, numb from GTTDBO.TRADE ;
/
SPOOL OFF
SET serveroutput OFF

EXIT

Any advice. Its been driving me crazy

PAVB
03-21-2007, 05:55 PM
select trade, datet, numb from GTTDBO.TRADE ;
/
SPOOL OFF


Take out the slash