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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

"where" statement

Hi Everyone

I have the following script:

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft;

I would like to include only values that are "AG", "AP" and "DC"

How would I have to script this?

Thank you very much for your help!

1 Solution

Accepted Solutions
anbu1984
Master III
Master III

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft

Where Match(mid(job_nummer, 11,2), 'AG', 'AP' ,'DC');

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat,

    jobkategorie

FROM EASY.job where "datum_auftrag" is not null;

View solution in original post

19 Replies
ashfaq_haseeb
Champion III
Champion III

Hi try below

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft;

FROM EASY.job where "datum_auftrag" is not null

and mid(job_nummer, 11,2) in ("AG", "AP" and "DC);

Regards

ASHFAQ

Not applicable
Author

hm, that one does not work for me...

ashfaq_haseeb
Champion III
Champion III

Hi try this

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft;

FROM EASY.job where "datum_auftrag" is not null

and mid(job_nummer, 11,2) in ('AG', 'AP' and 'DC');

Regards

ASHFAQ

Not applicable
Author

Thank you for your help Ashfaq. Still get an error with this code...

tresesco
MVP
MVP

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft

resident <> Where Match(job_number, 'AG', 'AP' ,'DC');

gandalfgray
Specialist II
Specialist II

The Load you are trying to do, is that from a sql source or from a resident table?

tresesco
MVP
MVP

And, if you are loading from DB then try like Ashfaq as suggested with a small correction: remove And  and try like :

in ('AG', 'AP' , 'DC');

gandalfgray
Specialist II
Specialist II

And if loading from resident I think it should be:

where match(mid(job_nummer, 11,2),'AG', 'AP', 'DC');

Not applicable
Author

Hi GandalfiGray

I am loading data from a pervasive database.

Thank you for your help...