6 Replies Latest reply: Jun 24, 2005 8:03 AM by Laurent Schneider RSS

    set wrap off

    431937
      Hi Friends,

      When I run this
      SQL> SET WRAP OFF
      SQL>Select * from <table>;

      rows will be truncated

      rows will be truncated

      rows will be truncated

      then <ROWS>

      I am not able to understand what it is exactly doing here.
      If you have any thoughts regarding it please let me know.
      Thanks,
      Vishal
        • 1. Re: set wrap off
          27876
          Example please?
          SQL> set wrap off
          SQL> select * from scott.emp ;
          
               EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
                7369 SMITH      CLERK           7902 17-DEC-80        800                    20
                7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
                7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
                7566 JONES      MANAGER         7839 02-APR-81       2975                    20
                7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
                7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
                7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
                7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
                7839 KING       PRESIDENT            17-NOV-81       5000                    10
                7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
                7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
                7900 JAMES      CLERK           7698 03-DEC-81        950                    30
                7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
                7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
          
          14 rows selected.
          
          SQL>
          • 2. Re: set wrap off
            431937
            Thanks- Kamal for the response.
            I did SET LINESIZE 900
            and after that it is not coming..


            It was actually truncating the line/row
            and giving a warning message before displaying the records.

            Thanks,
            • 3. Re: set wrap off
              27876
              Again, I'm not seeing the same behaviour that you are mentioning.
              Please post a cut-n-paste of the SQL*Plus session (like I do below) to show the problem (with complete steps).
              SQL> SET LINESIZE 900
              SQL> set wrap off
              SQL> select * from scott.emp ;
              
                   EMPNO ENAME      JOB              MGR HIREDATE           SAL       COMM     DEPTNO
              ---------- ---------- --------- ---------- ----------- ---------- ---------- ----------
                    7369 SMITH      CLERK           7902 17-DEC-1980        800                    20
                    7499 ALLEN      SALESMAN        7698 20-FEB-1981       1600        300         30
                    7521 WARD       SALESMAN        7698 22-FEB-1981       1250        500         30
                    7566 JONES      MANAGER         7839 02-APR-1981       2975                    20
                    7654 MARTIN     SALESMAN        7698 28-SEP-1981       1250       1400         30
                    7698 BLAKE      MANAGER         7839 01-MAY-1981       2850                    30
                    7782 CLARK      MANAGER         7839 09-JUN-1981       2450                    10
                    7788 SCOTT      ANALYST         7566 19-APR-0087       3000                    20
                    7839 KING       PRESIDENT            17-NOV-1981       5000                    10
                    7844 TURNER     SALESMAN        7698 08-SEP-1981       1500          0         30
                    7876 ADAMS      CLERK           7788 23-MAY-0087       1100                    20
                    7900 JAMES      CLERK           7698 03-DEC-1981        950                    30
                    7902 FORD       ANALYST         7566 03-DEC-1981       3000                    20
                    7934 MILLER     CLERK           7782 23-JAN-1982       1300                    10
              
              14 rows selected.
              
              SQL>
              • 4. Re: set wrap off
                Laurent Schneider
                SQL> set lin 15  wrap off
                SQL> show wrap
                wrap : lines will be truncated
                SQL> select * from emp;   
                rows will be truncated
                
                rows will be truncated
                
                rows will be truncated
                
                rows will be truncated
                
                rows will be truncated
                
                rows will be truncated
                
                     EMPNO ENAM
                ---------- ----
                      7369 SMIT
                      7499 ALLE
                      7521 WARD
                      7566 JONE
                      7654 MART
                      7698 BLAK
                      7782 CLAR
                      7788 SCOT
                      7839 KING
                      7844 TURN
                      7876 ADAM
                      7900 JAME
                      7902 FORD
                      7934 MILL
                
                14 rows selected.
                ok, why do you set wrap off then if you set lin to 900???

                However, I did not find out how to remove this rows will be truncated yet.

                Regards
                • 5. Re: set wrap off
                  Laurent Schneider
                  Note 163248.1 defines Oracle Support two brillant solutions to suppress this dummy when the rows are truncated :

                  1) set wrap on
                  rows will not be truncated
                  2) set lin 32000
                  rows can be up to 32K and are not likely to be truncated


                  ... no way! this set wrap off is unusable!

                  • 6. Re: set wrap off
                    Laurent Schneider
                    probably the question is : why do you want to do this?