Null handling on timestamp fied in modifystage
Moderators: chulett, rschirm, roy
Null handling on timestamp fied in modifystage
how can i handle null on timestamp in modify stage?
in specification properties what can i write? give suggestion.
Thanks
in specification properties what can i write? give suggestion.
Thanks
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
Again search would be a good thing to do:
(from another post): One way nulls can be handled is
When you have this problem of dates being null and you wish to use them in routines or stage variables, it can be usefull if you have a 'special date' that is outside of the domain of your data, i.e. 9999-12-31, which you can use set null dates to using
Code:
NullToValue(input.date, StringToTimestamp('9999-12-31 00:00:00', '%yyyy-%mm-%dd %hh:%nn:%ss'))
(from another post): One way nulls can be handled is
When you have this problem of dates being null and you wish to use them in routines or stage variables, it can be usefull if you have a 'special date' that is outside of the domain of your data, i.e. 9999-12-31, which you can use set null dates to using
Code:
NullToValue(input.date, StringToTimestamp('9999-12-31 00:00:00', '%yyyy-%mm-%dd %hh:%nn:%ss'))
Every great mistake has a halfway moment, a split second when it can be recalled and perhaps remedied.
Thanks for your response DSguru2B
Can you please give me one example?
I am getting problem with that.
DATEFIELD=handle_null()
what can i specify in () ?
Can you please give me one example?
I am getting problem with that.
DATEFIELD=handle_null()
what can i specify in () ?
DSguru2B wrote:A small correction here. NullToValue() will work only in the transformer stage. It wont in the modify stage. There is a mistake in the parallel guide. Use handle_null(). Search on the name for its exact syntax.
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
It will be same as the NullToValue.
IHTH
Code: Select all
DateFiled=handle_null(FieldName, "NULL")
I haven't failed, I've found 10,000 ways that don't work.
Thomas Alva Edison(1847-1931)
Thomas Alva Edison(1847-1931)
I specified in properties like below
specification=DATE = handle_null(DATE," ")
I am getting the below Error.
Modify_14: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "DATE" to field "DATE": Bad literal for type timestamp: .
Please help me
specification=DATE = handle_null(DATE," ")
I am getting the below Error.
Modify_14: Error when checking operator: When binding output schema variable "outRec": When binding output interface field "DATE" to field "DATE": Bad literal for type timestamp: .
Please help me
us1aslam1us wrote:It will be same as the NullToValue.
IHTHCode: Select all
DateFiled=handle_null(FieldName, "NULL")
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA