9 Replies Latest reply: Jan 4, 2013 3:31 PM by stefan nebesnak RSS

    rows will be truncated

    709949
      Hi Friends,

      I have a problem with the query which is called from CGI file.

      I'm getting "rows will be truncated" error.

      I have these settings followed by actual query which returns 64 columns

      set arraysize 2000
      set feedback off
      set heading off
      set line 10000
      set newpage 0
      set pagesize 0
      set scan off
      set space 0
      set tab off
      set trimout on
      set verify off
      set wrap off
      set colsep |
      whenever sqlerror exit 1
      whenever oserror exit 2


      this was working fine since more than an year but now it is giving issue. I guesssome OS or DB environment settings have been changed.
      we didn't change any code but how this issue occurs?

      please advice.

      Thanks & Regards,
      Kiran
        • 1. Re: rows will be truncated
          sb92075
          kiran wrote:
          Hi Friends,

          I have a problem with the query which is called from CGI file.

          I'm getting "rows will be truncated" error.

          I have these settings followed by actual query which returns 64 columns

          set arraysize 2000
          set feedback off
          set heading off
          set line 10000
          set newpage 0
          set pagesize 0
          set scan off
          set space 0
          set tab off
          set trimout on
          set verify off
          set wrap off
          set colsep |
          whenever sqlerror exit 1
          whenever oserror exit 2


          this was working fine since more than an year but now it is giving issue. I guesssome OS or DB environment settings have been changed.
          we didn't change any code but how this issue occurs?

          please advice.

          Thanks & Regards,
          Kiran
          or data got bigger


          How do I ask a question on the forums?
          SQL and PL/SQL FAQ
          • 2. Re: rows will be truncated
            rp0428
            >
            I have these settings followed by actual query which returns 64 columns
            >
            So you post the part that works and ask a question about the part you don't post?

            Can you please look at my bicycle and tell me what is wrong with my car?
            • 3. Re: rows will be truncated
              709949
              The actual query is very big and it is concatenated with html tags, so the output of the query is used as html source which has column values embedded within html tags. so the output of the query is printed within the CGI and the CGI executes on the browser.

              so I would like to know why the "rows will be truncated" error comes?

              where there is no changes done to any piece of code..

              thanks,
              Kiran
              • 4. Re: rows will be truncated
                sb92075
                kiran wrote:
                The actual query is very big and it is concatenated with html tags, so the output of the query is used as html source which has column values embedded within html tags. so the output of the query is printed within the CGI and the CGI executes on the browser.

                so I would like to know why the "rows will be truncated" error comes?
                real Oracle include error number; like ORA-01555

                >
                where there is no changes done to any piece of code..

                thanks,
                Kiran
                TOTAL_PRICE / AVERAGE_PRICE works well; except when AVERAGE_PRICE = 0

                data dependent errors can occur

                NEW_STRING := OLD_STRING || NEXT_CHUNK;

                above works fine until size of NEW_STRING is exceeded.



                How do I ask a question on the forums?
                SQL and PL/SQL FAQ
                • 5. Re: rows will be truncated
                  Mark Malakanov (user11181920)
                  I would like to know why the "rows will be truncated" error comes?
                  What is Oracle Error number and message?

                  Try to increase values in following
                  set arraysize
                  set line

                  Edited by: Mark Malakanov (user11181920) on Jan 4, 2013 2:20 PM
                  • 6. Re: rows will be truncated
                    709949
                    set arraysize 5000 (max)
                    set line 32000 (32767)

                    does not help, same error "rows will be truncated"

                    there is no ORA error number shown.

                    The same settings were working fine for years together, suddenly from 10 days this issue started occurring.

                    is any oracle patch changed the DB settings?

                    Thanks,
                    Kiran
                    • 7. Re: rows will be truncated
                      Mark Malakanov (user11181920)
                      It is hard to say without looking into your query and CGI file.
                      "CGI file" tells nothing. What is it? sqlplus? Shell script that calls sqlplus? Perl? C?
                      What happens when you run your query just in SQL*Plus?
                      What is version of DB and Client?
                      • 8. Re: rows will be truncated
                        jgarry
                        It's the "set wrap off." See set wrap off

                        Funnily enough, that was the first thing that came up when I googled "rows will be truncated" second result was this thread.
                        • 9. Re: rows will be truncated
                          stefan nebesnak
                          so I would like to know why the "rows will be truncated" error comes?

                          where there is no changes done to any piece of code..

                          thanks,
                          Kiran
                          It is warning that query results are too wide to fit on the terminal.
                          Maybe data has been changed?
                          Check the length of the string that will be printed.

                          Use below statements.
                          COLUMN my_column CLEAR; --resize the width to the same size as the maximum number of characters that can be stored in the column.
                          SET WRAP ON;  --one line of the table will be split across multiple lines of the terminal when necessary.
                          CGI script supported by your web server ( Perl script, UNIX shell script, Windows batch file, JavaScript, Java ) starts SQL*Plus session and runs the SQL script.
                          The query results are displayed directly in the web browser.

                          http://docs.oracle.com/cd/B10500_01/server.920/a90842/ch8.htm#1005745