Resources

ALTER TABLE ALTER PARTITION ENDING AT (Date sequence)

Topic: Code Place

Subtopic: DB2 for z/OS



Given a table partitioned by ascending date
with a highest Limit Key = 'MAXVALUE'

create alter statements
ALTER TABLE [a.b] ALTER PARTITION [n] ENDING AT ('yyyy-mm-dd');
to bring table/partition limit keys up to the most recent possible period.
* Statements sequenced in descending order by (logical) partition number

Two versions of the code
1) Update Limit Keys which are datatype DATE
2) Update Limit Keys which are datatype INT but contain dates in [yyyymmdd] format

This is a more intelligent version of SQL submitted in 2015 for a similar purpose.



Click Here to Download

NOTE: These are only open to members of IDUG. If you are not a member, please CLICK HERE for more information.