How to convert nullable Column to Non Nullable Column?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 34
- Joined: Thu Feb 16, 2006 8:34 am
- Location: mumbai
How to convert nullable Column to Non Nullable Column?
Hi,
I have 4 column's which is of Nullable "NO", Is there any way to change this to Nullable "YES"...?
Regards,
JIM
I have 4 column's which is of Nullable "NO", Is there any way to change this to Nullable "YES"...?
Regards,
JIM
Re: How to convert nullable Column to Non Nullable Column?
have you tried using modify stage.
-
- Participant
- Posts: 34
- Joined: Thu Feb 16, 2006 8:34 am
- Location: mumbai
Yes I tried with modify stage and I am getting following error...
Modify_506: When checking operator: When binding output schema variable "outRec": When binding output interface field "PLANT_IDENT_CD" to field "PLANT_IDENT_CD": Null value handling is specified with a non-nullable source field and no conversion; ignoring.
I used : PLANT_IDENT_CD = handle_null(PLANT_IDENT_CD, -1)
regards,
JIm
Modify_506: When checking operator: When binding output schema variable "outRec": When binding output interface field "PLANT_IDENT_CD" to field "PLANT_IDENT_CD": Null value handling is specified with a non-nullable source field and no conversion; ignoring.
I used : PLANT_IDENT_CD = handle_null(PLANT_IDENT_CD, -1)
regards,
JIm
Do it in a transform stage, but you need to ensure that the new, non-nullable, column doesn't contain any nulls. You can use several null-handling functions to do this.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 34
- Joined: Thu Feb 16, 2006 8:34 am
- Location: mumbai
My job is like ...
(PLANT_IDENT_CD) Nullable No
Plt_idt_cd----------- Lkup-------------------->Transformer---->OracleEnt
(Nullable Yes)
From lookup ,I have to convert this PLANT_IDENT_CD to Nullable 'YES' and later it is passed to transformer. When I try change this column to Nullable 'Yes', this is dropped in transformer.
Regards,
jim
(PLANT_IDENT_CD) Nullable No
Plt_idt_cd----------- Lkup-------------------->Transformer---->OracleEnt
(Nullable Yes)
From lookup ,I have to convert this PLANT_IDENT_CD to Nullable 'YES' and later it is passed to transformer. When I try change this column to Nullable 'Yes', this is dropped in transformer.
Regards,
jim
The original field is Nullable=NO, meaning the field cannot accept Nulls, and at that point should not contain Null.
Going from Nullable:No to Nullable:Yes does not require any conversion functions, just set the output nullable to Yes in any stage, Copy stage if you like!
Your attempts with the Modify stage are not required.
Obviously, after the null change, the field may now contain Null, so be careful with logic in transformers if the field does have null in it and you're specifically checking, e.g.
if IsNotNull(<Field>) then UpCase(<Field>) else <Field>
If you let Null go through a function like UpCase the row will be dropped by the transformer.
Going from Nullable:No to Nullable:Yes does not require any conversion functions, just set the output nullable to Yes in any stage, Copy stage if you like!
Your attempts with the Modify stage are not required.
Obviously, after the null change, the field may now contain Null, so be careful with logic in transformers if the field does have null in it and you're specifically checking, e.g.
if IsNotNull(<Field>) then UpCase(<Field>) else <Field>
If you let Null go through a function like UpCase the row will be dropped by the transformer.
Yes, I read the title part and that is why I put my post in. I didn't realize you were going from non to nullable, in which case you can do this in just about any stage.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 34
- Joined: Thu Feb 16, 2006 8:34 am
- Location: mumbai
If I do the lookup with "Nullable No" to "Nullable yes" column,
Job was aborted ...So I tried with modify stage to convert this Nullable NO to Nullable YES.
Regard,
jim
Job was aborted ...So I tried with modify stage to convert this Nullable NO to Nullable YES.
Regard,
jim
M.Gowthaman,
Accenture Service Pvt Ltd, M2A.
Mobile: +91 9819713784
Ext No: 4323
“Developing Software & Walking through water are easy, if it is frozen..."
Accenture Service Pvt Ltd, M2A.
Mobile: +91 9819713784
Ext No: 4323
“Developing Software & Walking through water are easy, if it is frozen..."
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: