Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi
i have one filed ,so my data is
load * inline [
data
123
abc
11ab
23ac
];
my req:
once reload i want display only numaric value i'e 123 and second time display text and one more is only text and numaric
so total one time 123
second time abc
next 11ab and 23ac
how?
You could create a type-state for your field, like:
load *, if(isnum(data), 'numeric', if(len(keepchar(data, '0123456789'))>=1, 'mixed', 'pure text')) as [data-type];
load * inline [
data
123
abc
11ab
23ac
];
- Marcus
Please Try
temp:
load * inline
[
Data
123
abc
11ab
23ac
];
NoConcatenate
Numeric:
LOAD Data as NumericData Resident temp where IsNum(num(Data))=-1 ;
NoConcatenate
alpha:
LOAD Data as AlphaNumeric Resident temp where IsNum(num(Data))<>-1 and PurgeChar(lower(Data),'abcdefghijklmnopqrstuvwxyz')<>'' ;
NoConcatenate
text:
LOAD Data as TextData Resident temp where len(PurgeChar(lower(Data),'abcdefghijklmnopqrstuvwxyz'))=0;
drop Table temp;