Thanks, But where do I find info on row_number. I did a search at IBM's info center and looked through the on-line SQL reference there and couldn't find it. Do you have a suggested source for DB2 SQL reference? I am 2 weeks into DB2 and need to build up my reference links and books.
Even more flexible is the use of the rank() or dense_rank()function , if you combine it with the 'partition over' phrase. This will allow you to rank data first and then limit the resultset by setting condition on the individual ranks.
rank() over (order by <field1>)
rank() over (partition by <field2> order by <field1>) T. Blom
Information analyst
tbl@shimano-eu.com
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.