Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

upaliwije
Contributor 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
MVP
MVP

Re: Load Script

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

3 Replies
MVP
MVP

Re: Load Script

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

Highlighted
arvind1494
Valued Contributor

Re: Load Script

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
Valued Contributor

Re: Load Script

this is output