Column Length - Scale

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
Gopalraja
Participant
Posts: 18
Joined: Wed Jun 18, 2008 3:51 am
Location: Chennai

Column Length - Scale

Post by Gopalraja »

Hi,

If I am defining the legth of column is 10(Integer Type) but my real data length is only 5. I need to use all length which is specified in the column metadata.

My real data is : 12345 but I need a format like this. i.e 0000012345

Could u pls help me out how can I achieve this...
Thanks & Regards,
Gopal
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The leading zeroes won't exist in an integer column, only when you display or move the column to a character one. If you create a CHAR(10) column and a derivation of "RIGHT('0000000000':In.IntegerColumn,10)" you should get your required output.
Gopalraja
Participant
Posts: 18
Joined: Wed Jun 18, 2008 3:51 am
Location: Chennai

Post by Gopalraja »

Hi ArndW,

Thanks for your suggesion. I have tried like if I am using numeric datatype, I got exact output but after the value dot(.) was present.

Ex. 0000012345. like this....

I'll try ur idea too....

Thankyou very much

Regards,
Gopal
Thanks & Regards,
Gopal
Gopalraja
Participant
Posts: 18
Joined: Wed Jun 18, 2008 3:51 am
Location: Chennai

Post by Gopalraja »

Hi ArndW,

Thanks for your suggesion. I have tried like if I am using numeric datatype, I got exact output but after the value dot(.) was present.

Ex. 0000012345. like this....

I'll try ur idea too....

Thankyou very much

Regards,
Gopal
Thanks & Regards,
Gopal
Post Reply