Results 1 to 9 of 9

Thread: Rownum

  1. #1
    Join Date
    Jun 2003
    Posts
    294

    Unanswered: Rownum

    Hello,

    I wanna have something like a rownum for iseries DB2,
    I mean, i need to have a function for being invoked in a Query like this:

    Select rowfuncion, Id from A_Table

    and i wanna have something like this :


    1 Id_01
    2 Id_45
    3 Id_03
    4 Id_50


    How do I do it?

  2. #2
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276

    Re: Rownum

    hi,

    This is a example:

    select RANK() OVER (ORDER BY <Your field> DESC) AS myRANK
    from <your table>


    abel.

  3. #3
    Join Date
    Jun 2003
    Posts
    294

    Re: Rownum

    No man,

    That's not possible in Iseries

  4. #4
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276

    Angry Re: Rownum

    May be can explain to me, what version of db2 and OS-

    In db2 UDB v.8.1.4 for windows this run ok, but, I unknow your system.

  5. #5
    Join Date
    May 2002
    Location
    General Deheza, Cba, Arg.
    Posts
    276

    Re: Rownum

    talk spanish?

  6. #6
    Join Date
    Jun 2003
    Posts
    294

    Unhappy Re: Rownum

    Hello I'm trying to use rownumber in Linux and it works perfectly
    with DB2 8.1 but id doesn't work in ISeries 5.2

  7. #7
    Join Date
    Jun 2003
    Posts
    294

    Re: Rownum

    En Español
    En español como me lo solicitaste,

    Primero que todo, gracias por tu interes, necesito utilizar el Rownumber o llevar una numeracion de los registros que retorna un query de una manera no muy costosa, en Iseries (sistema operativo) sobre el cual está DB2.

    Es claro ahora ??

  8. #8
    Join Date
    Jun 2002
    Location
    UK
    Posts
    525
    See the end of this thread...

    http://www.dbforums.com/t990660.html

  9. #9
    Join Date
    Jun 2003
    Posts
    294

    Wink

    Thanks everybody !!!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •