remove zero and a point from nvarchar

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
georgheretis
Participant
Posts: 5
Joined: Wed Oct 24, 2012 7:24 am

remove zero and a point from nvarchar

Post by georgheretis »

Goodmorning. I have a field Nvarchar with length 450. My data is in the form 00000000000000000140. (20 characters including the point (.). I would like to remove all zeros and the point at the end and keep only the 140. If the case is 0000000000000000000. , I need to have 0. Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Trim the leading "0" characters and trim the trailing "." character.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Else you can pass that value to a column whose type in INT.
Post Reply