Page 1 of 1

Tuncating zeros in XML output stgae

Posted: Fri Aug 06, 2010 12:47 pm
by sri75
Hi ,



When I write data (input filed (9,2) ) to XML output stage (target filed (9,2)), the trailing zeros were truncated. I did check with dataset as output stage, it retained trailing zeros.

Can you please let me know how to hande this before I send data to XML.

Thanks
Sri

Posted: Fri Aug 06, 2010 12:50 pm
by anbu
Define the field as varchar of appropriate length in target XML output stage

Posted: Fri Aug 06, 2010 1:32 pm
by sri75
Thanks anbu for your reply.It did work, but I need to truncate leading zeros. when I tried with decimaltostring function it is truncating both leading and trailing zeros.

Posted: Fri Aug 06, 2010 1:48 pm
by anbu

Code: Select all

Trim(Field,'0', 'L')

Posted: Fri Aug 06, 2010 5:38 pm
by chulett
sri75 wrote:Thanks anbu for your reply.It did work, but I need to truncate leading zeros. when I tried with decimaltostring function it is truncating both leading and trailing zeros.
You might want to post the syntax you were using for this.