Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading in number string without preceeding characters

Hi I'd like to know how to load in a series of numbers from a field without the proceeding characters. For instance I have

Sales :

$35666

£50000

(6788

)89998

I want to return the list so that it only loads in the numbers ie :

35666

50000

6788

89998

5 Replies
marcus_sommer

You could use: keepchar(Sales, '0123456789') as Sales.

- Marcus

sunny_talwar

Or this:

Right(Sales, Len(Sales) - 1)) as Sales

Not applicable
Author

Thanks - would this work correctly even if one the values didnt contain any characters or will always remove the first character ?

marcus_sommer

It will always remove the first character. The above mentioned keepchar-function will with these parameter only return numeric chars. If your data are more different then that then you should post more of them.

- Marcus

sunny_talwar

This will always remove the first character.

You can do this if you don't want to remove in case the first character is a number

If(IsNum(Left(Sales, 1)), Sales, Right(Sales, Len(Sales) - 1))) as Sales