Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a field named "Product" that has numbers which start with zeroes that I want to get rid of.
For example, some of the entries in this field are:
0000002344
00000213456
00000000023
I want to get rid of the zeroes and keep only the numbers
2344
213456
23
and I want to name this new column as "PRODUCT" and I want to do this under a load statement. not in the SQL that extracts this column. I tried a Ltrim but it didnt work
Can someone help me with the code?
Try this
Replace(LTrim(Replace(PRODUCT, '0', ' ')), ' ', '0') as PRODUCT
Try this
Replace(LTrim(Replace(PRODUCT, '0', ' ')), ' ', '0') as PRODUCT
The field name is in lowercase that I want to rename in uppercase.
do you mean: Replace(LTrim(Replace(Product, '0', ' ')), ' ', '0') as PRODUCT ?
sure
Num(Product) AS PRODUCT
i also want to convert thefield " prodduct" to text at the same time, how can i incorporate that in the code you provided?
May be this
Text(Replace(LTrim(Replace(Product, '0', ' ')), ' ', '0')) as PRODUCT