Consultor Eletrônico



Kbase P13266: Invalid date when assigning "default sysdate" to an SQL-92 t
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   1/30/2003
Status: Unverified

FACT(s) (Environment):

Progress 9.x

SYMPTOM(s):

Attempting to create a table that contains a date column, which has today's date as the default value. e.g.:
CREATE TABLE TABLE-NAME
(CREATION_DATE TIMESTAMP default sysdate not null);

[JDBC Progress Driver]:Invalid date value (7496)

[JDBC Progress Driver]:Invalid date string (7497)

CAUSE:

sysdate returns today's date which is a "DATE" type data but not the timestamp.

FIX:

Use "DATE" instead of "TIMESTAMP" when trying to apply "default sysdate". e.g.:
CREATE TABLE TABLE-NAME
(CREATION_DATE DATE default sysdate not null);