You are right. I agree with you.
My main intention was to show the rich functional capabilities of
non-procedural part of SQL Language, including expresssions and DB2
supplied functions.
Anyway, I found a error in my code.
Quote:
, '%h', SUBSTR(CHAR(QUARTER(ATIMESTAMP)/2),1,1))
is wrong. it should be the following