ZEROES in Decimal data

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
durgaps
Participant
Posts: 74
Joined: Sat Jul 08, 2006 4:09 am
Location: Melbourne, Australia
Contact:

ZEROES in Decimal data

Post by durgaps »

Hi,

I have a decimal column of format Length=16 and Scale=6 coming from a text file. There is a check in the Transformer stage in the derivation tab as "If Trim(In_Col) = 0 Then Space(17) else Trim(In_Col)". But the check for ZEROES is not happening, but when i changed the check to "If Trim(In_Col) = '0000000000.000000' " then the check for ZEROES is happening. But i need to check for a generic value for ZEROES i.e. the check has to be for '0'. Is there any way I can achieve it?

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

Post by ray.wurlod »

The zeroes are displayed by View Data so that you can verify that precision and scale are being handled properly. You can do regular comparisons (such as InLink.MyColumn = 0.0) to test for zero. You ought not to need the Trim() functions at all.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Is it you are converting the decimal to varchar, else space and trim wont help you.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply