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: 
Not applicable

Do not load all data

Hi all

I have a small problem. I am loading some data and there I have articles with different number of figures (5-7-8-9). I will only load data for the articles that has a length of 7 of more.

How do I do that?

EXTERNALIDENTIFIER is my article and I have tried some different solutions without luck

LOAD

//   ID,
//    VERSION,    EXTERNALIDENTIFIER,
   
if(len(EXTERNALIDENTIFIER>=7),EXTERNALIDENTIFIER) as Article,

//    HOSTIDENTIFIER,
//    DESCRIPTION,
//    DELETEDBYHOST,
//    LASTORDER,
//    SHELFLIFE,

best regards

Bjarne

1 Solution

Accepted Solutions
rbecher
MVP
MVP

Which database vendor do you have? Could be length( )..

You could also use a where clause in the LOAD part:

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID

where len(EXTERNALIDENTIFIER)>=7;

SQL SELECT *
FROM MSMATERIAL;

Astrato.io Head of R&D

View solution in original post

4 Replies
rbecher
MVP
MVP

Hi Bjarne,

just use a Where Clause:

where len(EXTERNALIDENTIFIER)>=7

- Ralf

Astrato.io Head of R&D
Not applicable
Author

Hi Ralf

I have tried this

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID;

SQL SELECT *
FROM MSMATERIAL
where len(EXTERNALIDENTIFIER)>=7;

But it will not "eat" where len(EXTERNALIDENTIFIER)>=7; Any further help?

rbecher
MVP
MVP

Which database vendor do you have? Could be length( )..

You could also use a where clause in the LOAD part:

LOAD //   ID,
//    VERSION,    EXTERNALIDENTIFIER as Article,,

    "MERCHANDISECATEGORY_ID" as ArticleGroupID

where len(EXTERNALIDENTIFIER)>=7;

SQL SELECT *
FROM MSMATERIAL;

Astrato.io Head of R&D
Not applicable
Author

Hi

Length did work. thanks