8.2 - recursive sql procedure

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • andreyp#Antispam@mapsitnA#it4profit.com

    8.2 - recursive sql procedure

    Recursive call possible only through dynamic sql (prepare/execute)?

    Andy
  • Serge Rielau

    #2
    Re: 8.2 - recursive sql procedure

    andreyp#Antispa m@mapsitnA#it4p rofit.com wrote:
    [color=blue]
    > Recursive call possible only through dynamic sql (prepare/execute)?
    >
    > Andy[/color]
    Yes, is that a problem? I think SQL PL also supports EXECUTE IMMEDIATE....

    Cheers
    Serge

    Comment

    • andreyp#Antispam@mapsitnA#it4profit.com

      #3
      Re: 8.2 - recursive sql procedure

      Serge!

      When migrate from 7.2 - YES! And SQL0340 - TOO! I don't understand why i
      can't define 2 identically cursors with primitive constraction like this

      declare c1 cursor for
      with params(a,b,c) as ( values(a,b,c) )) ...
      ;

      declare c2 cursor for
      with params(a,b,c) as ( values(a,b,c) )) ...
      ;

      SQL0340N The common table expression "AVP.PARAMS " has the same identifier
      as
      another occurrence of a common table expression definition within the same

      statement. LINE NUMBER=82. SQLSTATE=42726

      And where I can found notes about this "features"?

      Best regards,
      Andy

      P.S. Usage client 8.2 => server 7.2 - ( | ) ! :-(

      But CC - more better and better! 10 years more and its will be useful. ;-)


      O! trap on some recursive sql fixed... But I have 3 more for easy trap
      db2. I need it for testing cluster HA enviroment...

      Comment

      • Serge Rielau

        #4
        Re: 8.2 - recursive sql procedure

        I'm not sure I understood everything...

        The error you observe with the duplicate name is a bug.
        Please contact support and we get it fixed.

        If you observe traps in DB2 and you do not call support? How is DB2
        development supposed to fix them? They will hang around until DB2 V22!

        When dealing with SQL Procedures the client version plays no role.
        All the interesting stuff happens on the server.

        Cheers
        Serge

        Comment

        • andreyp#Antispam@mapsitnA#it4profit.com

          #5
          Re: 8.2 - recursive sql procedure

          Serge! Sorry about my terrible English. My native language is C++. (c)

          For register apar I need recreate situation. When it's possible I do it
          (look this conf, for example). But if query based on large and non
          reproduced structure...

          I have a lot developers who can wrote crasy query. I often simple rewrite
          query and solve trap. Long time ago we spoke about using me as tester. May
          be You remember. :-)

          8.2 client -> 7.2 server.

          - in many applications I got SQL0351N
          - RUNSTATS ON TABLE xxx WITH DISTRIBUTION AND DETAILED INDEXES ALL
          SHRLEVEL CHANGE;
          SQL2310N The utility could not generate statistics. Error "-1651" was
          returned.

          and many other

          Now I can't use my favorites software in normal mode. I need use two
          workstation or vmware with different clients.


          Best regards,
          Andy
          DB2 bugshunter :-)

          msn: a_panskikh < av-av > h o t m a i l . c o m
          icq: 2 1 - 5 9 6 - 2 1 3

          Comment

          • Serge Rielau

            #6
            Re: 8.2 - recursive sql procedure

            andreyp#Antispa m@mapsitnA#it4p rofit.com wrote:[color=blue]
            > For register apar I need recreate situation. When it's possible I do it
            > (look this conf, for example). But if query based on large and non
            > reproduced structure...[/color]
            ..-------------------------------------------------------------------.
            | You don't need to able to recreate to raise a PMR and get an APAR |
            '-------------------------------------------------------------------'
            We very much like you to because it is so much easier to debug using a
            debugger than to read the coffee grounds, but that's not the point.
            [color=blue]
            > I have a lot developers who can wrote crasy query. I often simple rewrite
            > query and solve trap. Long time ago we spoke about using me as tester. May
            > be You remember. :-)[/color]
            And then there are the customers you call every error a trap and scare
            the living daylights out of the rest of us.....
            [color=blue]
            > 8.2 client -> 7.2 server.
            >
            > - in many applications I got SQL0351N
            > - RUNSTATS ON TABLE xxx WITH DISTRIBUTION AND DETAILED INDEXES ALL
            > SHRLEVEL CHANGE;
            > SQL2310N The utility could not generate statistics. Error "-1651" was
            > returned.[/color]
            SQL1651N The request cannot be executed because the DB2 server
            version does not support this functionality.

            Explanation:

            Some new functionality is not supported against older DB2 server
            versions. Another possible cause of this error could be the
            request referenced objects with qualifiers of length that exceeds
            the support of the server version.

            User Response:

            Execute the request against a DB2 server where the latest DB2
            server version has been installed, or upgrade the server to the
            latest DB2 server version.

            db2 =>

            Comment

            • Serge Rielau

              #7
              Re: 8.2 - recursive sql procedure

              andreyp#Antispa m@mapsitnA#it4p rofit.com wrote:[color=blue]
              > For register apar I need recreate situation. When it's possible I do it
              > (look this conf, for example). But if query based on large and non
              > reproduced structure...[/color]
              ..-------------------------------------------------------------------.
              | You don't need to able to recreate to raise a PMR and get an APAR |
              '-------------------------------------------------------------------'
              We very much like you to because it is so much easier to debug using a
              debugger than to read the coffee grounds, but that's not the point.
              [color=blue]
              > I have a lot developers who can wrote crasy query. I often simple[/color]
              rewrite[color=blue]
              > query and solve trap. Long time ago we spoke about using me as[/color]
              tester. May[color=blue]
              > be You remember. :-)[/color]
              And then there are the customers you call every error a trap and scare
              the living daylights out of the rest of us.....
              [color=blue]
              > 8.2 client -> 7.2 server.
              >
              > - in many applications I got SQL0351N
              > - RUNSTATS ON TABLE xxx WITH DISTRIBUTION AND DETAILED INDEXES ALL
              > SHRLEVEL CHANGE;
              > SQL2310N The utility could not generate statistics. Error "-1651" was
              > returned.[/color]
              SQL1651N The request cannot be executed because the DB2 server
              version does not support this functionality.

              Explanation:

              Some new functionality is not supported against older DB2 server
              versions. Another possible cause of this error could be the
              request referenced objects with qualifiers of length that exceeds
              the support of the server version.

              User Response:

              Execute the request against a DB2 server where the latest DB2
              server version has been installed, or upgrade the server to the
              latest DB2 server version.

              db2 =>

              Comment

              Working...