Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Removing leading zeros and single quotes

I have a field that I need to remove leading zeros AND leading single quotes from as some have one or the other or both.

I have the expression for removing leading zeros as (replace(ltrim(replace([ID HU 2_EXIDV2.VEKP],'0',' ')),' ','0')) AS TRACKING_TEST

and the expression for removing leading single quotes as PurgeChar(TRACKING_TEST, chr(39)) AS TRACKING_TEST,

But I'm not sure how to put them together?

1 Solution

Accepted Solutions
sunny_talwar

May just this

(replace(ltrim(replace(PurgeChar([ID HU 2_EXIDV2.VEKP], Chr(39)),'0',' ')),' ','0')) AS TRACKING_TEST

View solution in original post

1 Reply
sunny_talwar

May just this

(replace(ltrim(replace(PurgeChar([ID HU 2_EXIDV2.VEKP], Chr(39)),'0',' ')),' ','0')) AS TRACKING_TEST