Re: CTE CONVERSION TO DB2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lenygold via DBMonster.com

    #1

    Re: CTE CONVERSION TO DB2

    Currently i am doing this at home: DB2 EXPRESS 9.5C
    THANK'S FOR YOUR HELP

    Serge Rielau wrote:
    >Here is the input table:
    > MPID MGRID EMPNAME SALARY
    >[quoted text clipped - 125 lines]
    > Please help with conversion.
    >Thank's in advance. Leny G.
    >
    >Which version/platform of DB2?
    >I think your problem is the row_number() (aside from the fact that the
    >query contains TSQL syntax like SELECT 1 UNION ALL SELECT 2)
    >
    >Cheers
    >Serge
    --
    Message posted via DBMonster.com


  • Serge Rielau

    #2
    Re: CTE CONVERSION TO DB2

    lenygold via DBMonster.com wrote:
    Currently i am doing this at home: DB2 EXPRESS 9.5C
    Splendid!

    Look for CONNECT BY.
    CTE's are great for general recursion. But when you want to "walk a
    tree" CONNECT BY is denser to write since all the gymnastics is packaged up.

    Cheers
    Serge

    Serge Rielau
    DB2 Solutions Development
    IBM Toronto Lab

    Comment

    • lenygold via DBMonster.com

      #3
      Re: CTE CONVERSION TO DB2

      This is fantastic Ssrge.
      Thank You very much.
      Any idea when all this new fetures will be available on mainframe?
      Serge Rielau wrote:
      >Currently i am doing this at home: DB2 EXPRESS 9.5C
      >Splendid!
      >http://www.ibm.com/developerworks/db.../long/porting/
      >Look for CONNECT BY.
      >CTE's are great for general recursion. But when you want to "walk a
      >tree" CONNECT BY is denser to write since all the gymnastics is packaged up.
      >
      >Cheers
      >Serge
      >
      >Serge Rielau
      >DB2 Solutions Development
      >IBM Toronto Lab
      --
      Message posted via http://www.dbmonster.com

      Comment

      • Serge Rielau

        #4
        Re: CTE CONVERSION TO DB2

        lenygold via DBMonster.com wrote:
        This is fantastic Ssrge.
        Thank You very much.
        Any idea when all these new features will be available on mainframe?
        These particular ones? Dunno, not imminent at any rate.

        Cheers
        Serge
        --
        Serge Rielau
        DB2 Solutions Development
        IBM Toronto Lab

        Comment

        Working...