disabling sqlplus output [message #257083] |
Tue, 07 August 2007 10:03  |
mrsmithq
Messages: 2 Registered: August 2007
|
Junior Member |
|
|
I have this sql script that is called via sqlplus. It inserts data into a table from another table. The problem is that when it does the select from the table to retrieve the data, it actually shows the data. I don't want it to do that. That creates a huge log file. I have another script that does the same thing but it does not produce the output. How do I avoid seeing the result set from the select?
Here is my sqlfile:
TRUNCATE TABLE mytable;
INSERT INTO mytable(
coulmn1,
column2,
column3,
column4)
SELECT coulmn1,
an_oracle_function(a, b, c) as column2,
column3,
column4
FROM (
SELECT
a,
b
c)res,
another table
WHERE column3 > 100;
commit;
exit;
|
|
|
Re: disabling sqlplus output [message #257092 is a reply to message #257083] |
Tue, 07 August 2007 10:17   |
Cthulhu
Messages: 381 Registered: September 2006 Location: UK
|
Senior Member |
|
|
If it was written correctly, you wouldn't see any data. I suspect it is not written correctly: the blank line between the insert statement and the select means the INSERT part is being ignored. It goes into the SQL*Plus buffer but then gets overwritten by the select statement. The select statement then gets executed and you see the output.
[Updated on: Tue, 07 August 2007 10:20] Report message to a moderator
|
|
|
|
Re: disabling sqlplus output [message #257154 is a reply to message #257106] |
Tue, 07 August 2007 11:59   |
groesbeek
Messages: 9 Registered: August 2007 Location: Netherlands
|
Junior Member |
|
|
>.The problem is that when it does the select from the table to retrieve the data, it actually shows the data
Issn't that something like
"set termout off" ??
|
|
|
|
Re: disabling sqlplus output [message #257180 is a reply to message #257156] |
Tue, 07 August 2007 13:03  |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
if your function prints output and the have sqlplus "serveroutput" on, then you'll get output. If you are seeing output from dbms_output and the select exceeds the buffer size, your seatement will fail. Try to understand where the output is coming from rather than trying to suppress the downstream effects with arbitrary settings.
|
|
|