cb*****@gmail.com wrote:
Hi all,
I have written a nice application which is working nicely on a DB2
V9.1 LUW with the olap row_number, so far so good but now I have to
let this run on a mainframe (z/os) DB2 ver 8... and this does not
exist there..... the wonderfull row_number.
How can have the same result I mean I am using the row_number as
primary key in the target table...
I dont understand why you do it the way you do, but that is beside the
scope of my post. Does z/os ver 8 have sequence's? If so you could
create a sequence say S:
create sequence S as integer;
and then use S as a generator:
alter sequence S restart with 1;
insert into T2
select c1, c2, ..., (nextval for S) as R
from T1;
/Lennart
[...]