DB2 Version 9.5 for Linux, UNIX, and Windows SQL Reference, Volume 1
Chapter 3. Functions
Quote:
INTEGER
...
...
date-expression An expression that returns a value of the DATE data type. The result is an
INTEGER value representing the date as yyyymmdd.
|
You can replace
cast(replace(char(current_date - 7 days),'-','') as integer)
with
INTEGER(current_date - 7 days)