handling nulls and conversion from decimal to int

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsdev_123
Participant
Posts: 25
Joined: Tue Oct 09, 2007 9:13 pm

handling nulls and conversion from decimal to int

Post by dsdev_123 »

hi is it possible to handle nulls and conversion from decimal to int on a single column in modify stage. please help me.
i have a case where my column is DLV_ORD_LIN which is a decimal and i have to convert that to int as well as i have to handle nulls together in modify stage.

thankyou
prasad
dsedi
Participant
Posts: 220
Joined: Wed Jun 02, 2004 12:38 am

Re: handling nulls and conversion from decimal to int

Post by dsedi »

dsdev_123 wrote:hi is it possible to handle nulls and conversion from decimal to int on a single column in modify stage. please help me.
i have a case where my column is DLV_ORD_LIN which is a decimal and i have to convert that to int as well as i have to handle nulls together in modify stage.

thankyou
prasad
In the Modify stage Stage Properties, Define a specification like
DLV_ORD_LIN:nullable integer(XX)=int32_from_decimal(DLV_ORD_LIN)
and on the output link,specify DLV_ORD_LIN as an integer..

Edi
dsdev_123
Participant
Posts: 25
Joined: Tue Oct 09, 2007 9:13 pm

Re: handling nulls and conversion from decimal to int

Post by dsdev_123 »

In the Modify stage Stage Properties, Define a specification like
DLV_ORD_LIN:nullable integer(XX)=In the Modify stage Stage Properties, Define a specification like
DLV_ORD_LIN:nullable integer(XX)=int32_from_decimal(DLV_ORD_LIN)
and on the output link,specify DLV_ORD_LIN as an integer..



thnaks for your reply
Actually the problem is
i have to defualt the null values to blanks and i need to change the datatype to of DLV_ORD_LIN from decimal to integer together. As you said if i give the specification like DLV_ORD_LIN:nullable integer(XX)=int32_from_decimal_DLV_ORD_LIN) the output DLV_ORD_LIN column is nullable. but i want it handle nulls coming from input DLV_ORD_LIN

thankyou
Post Reply