Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
upaliwije
Creator II
Creator II

Load Script

Hi Friends

I have following sampae data in my data table. In my data load script I want to segregate  codes with at least one letter Eg :  5KDIR,DIR22, SSDIR into category1 and Code with digits into category2.  Kindly help me to write the syntax.

 

CODE
5KDIR
DIR22
SSDIR
03456
04190
05012

05742

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

If there is no possibility of no letters but special characters, you could easily get it like:

Load

          If(IsNum(CODE), 2, 1) as Category

View solution in original post

3 Replies
tresB
Champion III
Champion III

If there is no possibility of no letters but special characters, you could easily get it like:

Load

          If(IsNum(CODE), 2, 1) as Category

arvind1494
Specialist
Specialist

Hi UPALI,

try this code in your load script for your requirement

Table:

load If(IsNum(CODE),CODE) as Category1,if(IsText(CODE),CODE) as Category2 ;

load * Inline [

CODE

5KDIR

DIR22

SSDIR

03456

04190

05012

05742

];

arvind1494
Specialist
Specialist

this is output