I have a situation. We have a column (exp_tp) that's the flag for the active record in the Datawarehouse (SCD 2). That column is of
Sql Type: Timestamp
Length : 26
Scale : 6
At the database level, that column is defaulted to 9999-12-31 23:59:59.999999.
Depending upon the incoming data i have to decide what goes into exp_tp column.
If the incoming timestamp is high 9s, i want to pass nothing so that the system generates 9999-12-31 23:59:59.999999.
If the incoming timestamp is not high 9s then i need to take that timestamp and load it into exp_ts
The problem
If the incoming timestamp is high 9s, i cannot pass 9999-12-31 23:59:59.999999 as that is the default value and the database will not accept that. Any other value, is accepted , even if its a nano second less , meaning 9999-12-31 23:59:59.999998 will be accepted but not 9999-12-31 23:59:59.999999
What i want to do
Is there a way where i can pass the value for exp_tp if my condition is true and not pass anything if my condition is not met so that the database can generate the high 9's ?
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Want to add, if the sql type is changed to varchar, it accepts it. I have that to fall back upon, just want to know if i can achieve what i have described in "What i want to do".