Page 1 of 1

remove zero and a point from nvarchar

Posted: Fri Aug 02, 2013 2:45 am
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

Posted: Fri Aug 02, 2013 2:50 am
by ray.wurlod
Trim the leading "0" characters and trim the trailing "." character.

Posted: Fri Aug 02, 2013 12:24 pm
by vinothkumar
Else you can pass that value to a column whose type in INT.