Page 1 of 1

Not getting data in the proper format in the target

Posted: Wed May 04, 2005 8:15 am
by gopskrish
Hi Everybody,

I am loading data to sequential flat file with sybase as my source using paralex. I am not getting the number columns in proper format. If the value is big, it gives me an exponential value. In the target i have specified as float (same as the source)
When i changed to numeric(9,2) it adds 0 if the number value is small (eg for 55000 , i am getting 0055000.00. I want the column value in the same way as in the source. Even changing the target type to Varchar gives me the same kind of output as the first one (exponential)

If the source value is 9500000 then the target value should be the same.
How to handle the same in Paralel extender. Let me know.
I am new to Paralex.

cheers,
Gopal

Posted: Wed May 04, 2005 8:35 am
by ds_is_fun
define the target column as VarChar. Following is a sample logic that you can use:

If Right(Trim(y),3)[1,1] = '.' Then y Else If Right(Trim(y),3)[2,1] = '.' Then y : '0' Else y : '.00'

where y = Trim(DecimalToString(DSLink2.a,"fix_zero,suppress_zero"),"0","L")

Posted: Wed May 04, 2005 9:09 am
by gopskrish
Hi ,

Thanks for helping me out on that. It is really working great. Great job and u have prooved that datastage is really fun. Nice job.I have been fighting with this for almost a day.

cheers,
gops