problem with a decimal field

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
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

problem with a decimal field

Post by vij »

Hi,

I have a string field column, which is to be converted into decimal when it is loaded into the xml.

Now the problem is- the input string is "00000499" and after i convert that to decimal(7,2), it is loaded with zeros infront of the decimal.

pls tell me how to remove the leading zeros?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Decimal data types are displayed with leading and trailing zeroes so that you can be sure that the precision and scale are handled correctly.

The only way to lose them in a parallel job, without using BASIC components, is to convert to string and trim the leading zeroes (and trailing zeroes if desired).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vij
Participant
Posts: 131
Joined: Fri Nov 17, 2006 12:43 am

Post by vij »

Hi Ray,

sorry to say this - i am not able to read ur message completely, as i dont hold the premium membership. can u pls post the reply visible to me? pls
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

vij

Premium membership is used to help pay for the bandwidth needed for this site to continue to operate. It does not cover the entire cost, because the owners of the site have elected to keep it affordable (only a few cents per day) - most people think you get good value for money.

Therefore, I will encourage you to purchase a premium membership, rather than undermine one of the site's funding sources.


Oh, and do find yourself some pronouns!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply