Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
daisy1438
Contributor III
Contributor III

How to load only numbers in field?

Hi

I have field Data like below

Data:

abc1927-23

2345asjjh123sdh

dr34

text123

111.

222.

333.

 

I want load only numbers instead of string.and remove the (.)in number.

Output:

111

222

333

Thanks

 

 

3 Replies
marcus_sommer

Try it with:

t: load replace(FIELD, '.', '') as FIELD from Source where isnum(replace(FIELD, '.', ''));

- Marcus

cfitzpatrick69
Partner - Contributor II
Partner - Contributor II


keepchar(FIELD,'1243567890') as FIELD where isnum(keepchar(FIELD,'1243567890'))
which would remove all non-number chars
sunny_talwar

Another possibility

Table:
LOAD Num(Num#(Data, '##.')) as Data
Where Num(Num#(Data, '##.'));
LOAD * INLINE [
    Data
    abc1927-23
    2345asjjh123sdh
    dr34
    text123
    111.
    222.
    333.
];