Re: SQL*PLUS- Spooling problem
Date: Wed, 10 Mar 1999 13:34:25 GMT
Message-ID: <F8DsDE.Iu0_at_liverpool.ac.uk>
[Quoted] David Vanmarcke (david.vanmarcke_at_argenta.be) wrote:
: Hi,
: I have the following syntax-like script (original is with 1500
: insert-commit-select blocks)
: ==========================
: spool inssel1.log
: SELECT TO_CHAR(sysdate, 'DD/MM/YYYY HH24:MI:SS') FROM dual
: /
: INSERT INTO owner1.table1 SELECT * FROM owner1.table1_at_db_name
: /
: COMMIT
: /
: SELECT 'info:','owner1','table1', COUNT(*) FROM owner1.table1
: /
: INSERT INTO owner1.table2 SELECT * FROM owner1.table2_at_db_name
: /
: COMMIT
: /
: SELECT 'info:','owner1','table2', COUNT(*) FROM owner1.table2
: /
: ...
: SELECT TO_CHAR(sysdate, 'DD/MM/YYYY HH24:MI:SS') FROM dual
: /
: spool off
: ==========================
: When the script is finished, the last xx lines of my logfiles are repeated
: twice
: although they have not been executed twice.
: Is there anybody who can give me a reason why this duplication of logged
: lines appears ???
: I assume it has something to do with SQL*PLUS versus database links ..., but
: I hope to have a confirmation from the pro's out there ! ;o)
: Thanx in advance !!!
: David.
Do the selects that repeat end in ; ? ie
SELECT 'info:','owner1','table2', COUNT(*) FROM owner1.table2; /
; causes select to run. / causes the contents of the buffer to be run. In effect select run twice.
Hope this helps Helen Received on Wed Mar 10 1999 - 14:34:25 CET