Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a field that has numerical values and combination of Alphabets and Numericals.
Example:
457362
A628408
8357832
B7532805
V283755
How do I load only rows with numbers and not the combination?
Output:
457362
A628408
8357832
B7532805
V283755
try below
Data:
Load *
where Flag=1;
Load *,
if(isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),1,0) as Flag Inline [
Field
123
ABC
12BC ];
Try below
Data:
load *
FROM Source
Where isnum(Field);
Is there a way to filter number-character values and only bring Alphabetical Strings?
Thought I could use IsText(Field) but that returns -1 even for number-character values
Try below
Data:
load *
FROM Source
Where not isnum(Field);
Hi,
This is not working, It shows both Text and Text-Number Combination values
what was your original requirement ? Was it not to filter just number?
try below
Data:
Load *
where Flag=1;
Load *,
if(isnum(if(len(trim(KeepChar(Field,'0123456789')))>0,KeepChar(Field,'0123456789'))) and
istext(if(len(trim(KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ')))>0,
KeepChar(Field,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'))),1,0) as Flag Inline [
Field
123
ABC
12BC ];