If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Rownum

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-29-04, 16:15
jortiz jortiz is offline
Registered User
 
Join Date: Jun 2003
Posts: 294
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?
Reply With Quote
  #2 (permalink)  
Old 03-29-04, 18:08
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
Re: Rownum

hi,

This is a example:

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


abel.
Reply With Quote
  #3 (permalink)  
Old 03-30-04, 11:48
jortiz jortiz is offline
Registered User
 
Join Date: Jun 2003
Posts: 294
Re: Rownum

No man,

That's not possible in Iseries
Reply With Quote
  #4 (permalink)  
Old 03-30-04, 11:59
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
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.
Reply With Quote
  #5 (permalink)  
Old 03-30-04, 12:00
achiola achiola is offline
Registered User
 
Join Date: May 2002
Location: General Deheza, Cba, Arg.
Posts: 273
Re: Rownum

talk spanish?
Reply With Quote
  #6 (permalink)  
Old 03-30-04, 13:44
jortiz jortiz is offline
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old 03-30-04, 14:02
jortiz jortiz is offline
Registered User
 
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 ??
Reply With Quote
  #8 (permalink)  
Old 03-30-04, 15:22
Damian Ibbotson Damian Ibbotson is offline
Padawan
 
Join Date: Jun 2002
Location: UK
Posts: 525
See the end of this thread...

http://www.dbforums.com/t990660.html
Reply With Quote
  #9 (permalink)  
Old 03-30-04, 17:58
jortiz jortiz is offline
Registered User
 
Join Date: Jun 2003
Posts: 294
Wink

Thanks everybody !!!!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On