[Solved] How to display only output of DBMS_OUTPUT.PUT_LINE , rest should be neglected

Hi All,

I Have written a script through that i am calling sql file

Sqlfile.sql

set time on
set timing on
set echo on
set head off
set scan on
set feedback on
set serveroutput on
set linesize 1000
DECLARE
v_acc_no NUMBER(10);
v_product_no NUMBER(10);
BEGIN
DBMS_OUTPUT.ENABLE(10000000);
select COUNT(*) INTO v_acc_no from &1;
SELECT COUNT(*) INTO v_product_no from &2;
DBMS_OUTPUT.PUT_LINE(v_acc_no||','||v_product_no);
END;
 

Its giving me following output

old 6: select COUNT(*) INTO v_acc_no from &1; 
new 6: select COUNT(*) INTO v_acc_no from Account; 
old 7: SELECT COUNT(*) INTO v_product_no from &2;
new 7: SELECT COUNT(*) INTO v_product_no from product_history; 
21652,679 
PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01

But i want to keep only the output this ie 21652,679 , rest i want to neglect ,
Is it possible to do it in sql only by setting some feature
ie set something off

Thanks

After the post editing the colors disappeared,
you could start by disabling verify:

set verify off 
1 Like

Hi all,

I find the solution,

Its set verify off

Sorry for the Thread.

---------- Post updated at 07:48 AM ---------- Previous update was at 07:45 AM ----------

can i also elimnate this output, By setting some feature off/on

PL/SQL procedure successfully completed.
Elapsed: 00:00:00.01

Yes:

set feed off timing off

Notice also that you've enabled them explicitly in your script ...

1 Like