Discussion:
Empty date in DB2
(too old to reply)
c***@hotmail.com
2007-09-10 05:39:56 UTC
Permalink
I have a table with a date field.

A date value will be written into this field every time update the record,
But when the record is first time INSERT into the table,
Than the date value is a zero value or "31 Dec 1899", as an indicator.

How we do this in db2?
Mark A
2007-09-10 06:41:08 UTC
Permalink
Post by c***@hotmail.com
I have a table with a date field.
A date value will be written into this field every time update the record,
But when the record is first time INSERT into the table,
Than the date value is a zero value or "31 Dec 1899", as an indicator.
How we do this in db2?
'1899-12-31'

It would be better if the column was nullable, and you used null to indicate
that no date is available.

Loading...