13 Replies Latest reply: Mar 24, 2009 8:40 AM by 621707 RSS

    set feedback off

    621707
      SQL> set verify off
      SQL> set termout off
      SQL> set feedback off
      SQL> spool on
      SQL> spool /home/oracle/test4.txt
      SQL> select empno from scott.emp where rownum=1;

      EMPNO
      ----------
      7369


      Why does it gives feedback?
      I dont want to display the output?

      Thanks,
        • 1. Re: set feedback off
          Christian Balz
          set serveroutput on
          Regards,

          Christian Balz
          • 2. Re: set feedback off
            621707
            I think u misunderstood the quesiton.

            I dont want to display the query output.

            SQL> select empno from scott.emp where rownum=1;

            EMPNO
            --------------------------------------------------------------------------------
            7369
            • 3. Re: set feedback off
              49084
              Another example of not reading the manuals: the "feedback" variable does not suppress terminal output.
              SET FEED[BACK] {6 | n | ON | OFF}
              Displays the number of records returned by a script when a script selects at least n records.

              ON or OFF turns this display on or off. Turning feedback ON sets n to 1. Setting feedback to zero is equivalent to turning it OFF.

              SET FEEDBACK OFF also turns off the statement confirmation messages such as 'Table created' and 'PL/SQL procedure successfully completed' that are displayed after successful SQL or PL/SQL statements.>
              SET TERM[OUT] {ON | OFF}
              SET TERMOUT is not supported in iSQL*Plus

              Controls the display of output generated by commands in a script that is executed with @, @@ or START. OFF suppresses the display so that you can spool output to a file without displaying the output on screen. ON displays the output on screen. TERMOUT OFF does not affect output from commands you enter interactively or redirect to SQL*Plus from the operating system.
              • 4. Re: set feedback off
                12826
                It will only do what you are expecting if you call the script from the command line not directly from SqlPlus.
                • 5. Re: set feedback off
                  621707
                  Thanks it works..

                  Still 1 problem.
                  I got the output like

                  SQL_REDO
                  --------------------------------------------------------------------------------
                  update "TEST"."EMAIL" set "STATUS" = 'SEND', "SYSCHANGED" = TO_DATE('23-
                  MAR-09', 'DD-MON-RR'), "SYSCHANGEDBY" = 'TEST' where "STATUS" = 'N' and "SYSC
                  HANGED" IS NULL and "SYSCHANGEDBY" IS NULL and id =305496172;

                  insert into "TEST"."TRACER"("ID","TS","SOURCE","INFO","MESSAGE") values ('140
                  92003',TO_TIMESTAMP('23-MAR-09 12.43.47 AM'),'.FullLaunch','<<--','* finished.')
                  ;

                  insert into "TEST"."EMAILBATCHLINE"("ID","EMAILBATCH_ID","SYSCHANGEDBY","SYSC
                  REATED","SYSCHANGED","SYSCREATEDBY","TXT") values ('55715490','305496151',NULL,T
                  O_DATE('23-MAR-09', 'DD-MON-RR'),NULL,'TEST',' av VistaPrint Limited.<BR>


                  I dont want to show column name also dont want to show ------ line.
                  What paramters need to set?
                  • 6. Re: set feedback off
                    49084
                    set head off
                    SET HEA[DING] {ON | OFF}
                    Controls printing of column headings in reports.

                    ON prints column headings in reports; OFF suppresses column headings.

                    The SET HEADING OFF command does not affect the column width displayed, it only suppresses the printing of the column header itself.>

                    [SET System Variable Summary|http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ch12040.htm]

                    Added link
                    • 7. Re: set feedback off
                      12826
                      In addition to SET Heading OFF, you can also use SET PageSize 0
                      The difference is, if you only use SET heading off it will still have a break (usually one blank line) between the value set by PageSize.
                      set headin off pages 5
                      select id from test where rownum <=10
                           187812
                           187813
                           187814
                           187815
                      
                           187816
                           187817
                           187818
                           187819
                      
                           187820
                           187821
                      
                      set pages 0
                      select id from test where rownum <=10;
                      
                       187812
                       187813
                       187814
                       187815
                       187816
                       187817
                       187818
                       187819
                       187820
                       187821
                      • 8. Re: set feedback off
                        49084
                        Right, or SET NEWPAGE NONE does the trick as well, if I'm not mistaken.

                        I suggest you read the documentation, ora_2009. I've posted a link.
                        • 9. Re: set feedback off
                          621707
                          Thanks guys for your replies. :)
                          • 10. Re: set feedback off
                            621707
                            Now one more thing i would like to know.

                            I used

                            set linesize 2000

                            But if i specify it then filesize becomes larger.
                            How can i remove the blank spaces from the file?
                            • 11. Re: set feedback off
                              Solomon Yakobson
                              ora_2009 wrote:
                              How can i remove the blank spaces from the file?
                              SET TRIMSPOOL ON
                              SY.
                              • 12. Re: set feedback off
                                12826
                                You also need SET TRIMSPOOL ON , this remove the blank at the end of each row
                                • 13. Re: set feedback off
                                  621707
                                  Thanks it works.

                                  Any other option if we can use to well formatted output.

                                  I used below options

                                  SET FEEDBACK OFF
                                  set termout off
                                  SET HEADING OFF
                                  set head off
                                  SET TRIMSPOOL ON
                                  set line 1300
                                  set pages 0

                                  More if any???

                                  Thanks,