Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
gkcchowdary
Creator
Creator

tell me bellow req?

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?

2 Replies
marcus_sommer

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

sasiparupudi1
Master III
Master III

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;