Null Values
Moderators: chulett, rschirm, roy
Null Values
Hi,
I need to handle a null column value.
Input is sequential file file.
One of the input column has null value.
Output is ORacle table and all columns are NOT Null.
In the transformer, i write
If IsNull(InRec.CITY_ADR) Then " " Else InRec.CITY_ADR
When I run the job and look in Director log, it has warning message
Customer..TransCust: ORA-01400: cannot insert NULL into ("Cust_t"."CITY_ADR")
Is there any other check I need to perform to avoid this error?
Thanks
Ketfos
I need to handle a null column value.
Input is sequential file file.
One of the input column has null value.
Output is ORacle table and all columns are NOT Null.
In the transformer, i write
If IsNull(InRec.CITY_ADR) Then " " Else InRec.CITY_ADR
When I run the job and look in Director log, it has warning message
Customer..TransCust: ORA-01400: cannot insert NULL into ("Cust_t"."CITY_ADR")
Is there any other check I need to perform to avoid this error?
Thanks
Ketfos
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
You said your input is a sequential file and that it has a column with a null value. How did you accomplish that? I don't see how a sequential file can have a null value. An empty string perhap, but not a null value.
Perhaps you should say:
If InRec.CITY_ADR = "" Then " " else InRec.CITY_ADR
Try it and see.
Larry
Perhaps you should say:
If InRec.CITY_ADR = "" Then " " else InRec.CITY_ADR
Try it and see.
Larry
-
- Charter Member
- Posts: 199
- Joined: Tue Jan 18, 2005 2:50 am
- Location: India