The following "sql" was running fine till yesterday. This is is run once a month. But, when I ran it after the 2005 roll-over, it is giving me a problem. Does nayone has a clue?
THanks,
Ramana
(select date-3 mtd, (mtd+1) nt, cast(
(cast(extract(year from nt) as char(4) ) || '-' || ( cast(extract(month from nt) as char(2) ) ) || '-01') as date) lmt_dt
from dbc.dbcinfo )
This returns:
mtd nt lmt_dt
2004-12-30 2004-12-31 2004-12-01
2004-12-30 2004-12-31 2004-12-01
BUT…
(select date-2 mtd, (mtd+1) nt, cast(
(cast(extract(year from nt) as char(4) ) || '-' || ( cast(extract(month from nt) as char(2) ) ) || '-01') as date) lmt_dt
from dbc.dbcinfo )
will fail with invalid date.
THanks,
Ramana
(select date-3 mtd, (mtd+1) nt, cast(
(cast(extract(year from nt) as char(4) ) || '-' || ( cast(extract(month from nt) as char(2) ) ) || '-01') as date) lmt_dt
from dbc.dbcinfo )
This returns:
mtd nt lmt_dt
2004-12-30 2004-12-31 2004-12-01
2004-12-30 2004-12-31 2004-12-01
BUT…
(select date-2 mtd, (mtd+1) nt, cast(
(cast(extract(year from nt) as char(4) ) || '-' || ( cast(extract(month from nt) as char(2) ) ) || '-01') as date) lmt_dt
from dbc.dbcinfo )
will fail with invalid date.