Skip to Content
0
Mar 26, 2015 at 07:47 PM

Default Timestamp DDL Issue for Teradata

440 Views

Discovered a syntax issue with the DDL when specifying a default value for a timestamp. The DDL needs to look like the following:

DEFAULT TIMESTAMP '1900-01-01 00:00:00.000000'

But PowerDesigner will only specify DEFAULT '1900-01-01 00:00:00.000000'

I tried adding the TIMESTAMP keyword as part of the value, but of course PowerDesigner doesn't know what to do with that and puts quotes around it. My other thought is to customize the XDB (which I already have quite a bit given we are on Teradata v15) to put a condition to change the DDL if the data type is a date, but I cannot seem to get the syntax right. I am using %DATATYPE%='TIMESTAMP(6)'? for the condition. No variation of this in modifying the column syntax to check for a condition works so that the code will look like the following if the condition is met:

[.Z:[%WITHDEFAULT%? with
default[ %DEFAULT%]:[ DEFAULT TIMESTAMP %DEFAULT%]]

Would very much appreciate any assistance or pointers in getting this resolved.