Rob,

You can create a UDF to return the sequence, but you
MUST use an order by, which seems to defeat the purpose.
If you are interested, here is an example of a UDF that will
return a sequence:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/iseries-toolkit/CVSROOT/src/qrpglesrc/numseq.irp?rev=HEAD&content-type=text/vnd.viewcvs-markup

David Morris

>>> rob@dekko.com 01/29/02 12:25PM >>>

You cannot use an Order by in an Update statement
therefore you can't
UPDATE ROB/ALAN
SET RANKING=0
ORDER BY BUCKS

Then I can't think of any built in function which would return the
number
you desired.

My question is this, what possible value is a ranking number when you
can
organize the file by any sort criteria you wish?  Especially when
you've
already determined that the rank is based on another column.

Rob Berendt



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.