Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
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

1 Solution

Accepted Solutions
tresesco
MVP
MVP

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
tresesco
MVP
MVP

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