Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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
Honored Contributor III

Re: "where" statement

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;

19 Replies

Re: "where" statement

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

Re: "where" statement

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

Re: "where" statement

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

Re: "where" statement

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

MVP
MVP

Re: "where" statement

LOAD *,

mid(job_nummer, 11,2) as Gesellschaft

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

gandalfgray
Valued Contributor

Re: "where" statement

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

MVP
MVP

Re: "where" statement

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

Re: "where" statement

And if loading from resident I think it should be:

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

Not applicable

Re: "where" statement

Hi GandalfiGray

I am loading data from a pervasive database.

Thank you for your help...

Community Browser