Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Where Clause & Join

I am trying to exclude fields that do not have a date entry in the following field. It works with a where clause but only for the field. I additionally would like to exlcude all values that are linked to this empty field especially the values in the field "auftragswert". How can I do this? Do I have to join the two tables?

This is my code:

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat,

    "nur_kv"

  

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

load *, [auf_kurs] * [auf_wert] / 100 as [Auftragswert];

SQL SELECT "auf_datum",

    "auf_fw",

    "auf_kurs",

    "auf_wert",

    bez,

    jobnr,

    "auf_anzahl",

    ltyp

FROM EASY.jleistg;

Thank you for your help!

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Where Clauve & Join

It will be:

Table1:

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat,

    "nur_kv"

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

Table2:

LEFT KEEP (Table1)

load *, [auf_kurs] * [auf_wert] / 100 as [Auftragswert];

SQL SELECT "auf_datum",

    "auf_fw",

    "auf_kurs",

    "auf_wert",

    bez,

    jobnr,

    "auf_anzahl",

    ltyp

FROM EASY.jleistg;

2 Replies
mov
Esteemed Contributor III

Re: Where Clauve & Join

It will be:

Table1:

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat,

    "nur_kv"

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

Table2:

LEFT KEEP (Table1)

load *, [auf_kurs] * [auf_wert] / 100 as [Auftragswert];

SQL SELECT "auf_datum",

    "auf_fw",

    "auf_kurs",

    "auf_wert",

    bez,

    jobnr,

    "auf_anzahl",

    ltyp

FROM EASY.jleistg;

Not applicable

Re: Where Clause & Join

Awesome! Thank you Michael.

Community Browser