Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Problem with "Where" clause

Hello everyone

I have the following code that gives me a problem with the "Where" clause:

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat

   

FROM EASY.job where "datum_auftrag" = date;

With the "Where" clause I would like to exclude entries that do not have a date.

Could someone help me with this?

Thank you very much in advance...

1 Solution

Accepted Solutions
mov
Esteemed Contributor III

Re: Problem with "Where" clause

where "datum_auftrag" is not null

24 Replies

Re: Problem with "Where" clause

try below

to load null only

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat

 

FROM EASY.job where  "datum_auftrag" is null;

Update

to exclude null

SQL SELECT "job_nummer",

    jobnr,

    "datum_auftrag",

    Year ("datum_auftrag") as Jahr,

    Month ("datum_auftrag") as Monat

 

FROM EASY.job where  "datum_auftrag" <> null;

Regards

ASHFAQ

Not applicable

Re: Problem with "Where" clause

Maybe

From EASY.job where "datum_auftrag" = date and "datum_auftrag" <> NULL;

Not applicable

Re: Problem with "Where" clause

Hm, does not work. Does it matter that the field type is DATE? I seem to have a problem with this particular field. the same expression for jobnr works...

Not applicable

Re: Problem with "Where" clause

How is Datum_auftrag formatted? How is Date formatted? Are they the exact same?

eduardo_sommer
Valued Contributor

Re: Problem with "Where" clause

Or,

Where "datum_auftrag" is not null

Eduardo

MVP & Luminary
MVP & Luminary

Re: Problem with "Where" clause

Hi Jan,

try this:

FROM EASY.job where "datum_auftrag" IS NOT NULL;

mov
Esteemed Contributor III

Re: Problem with "Where" clause

where "datum_auftrag" is not null

Not applicable

Re: Problem with "Where" clause

seems to be a tricky one. the expression works but does not filter out entries that do not have a date...

Not applicable

Re: Problem with "Where" clause

dd.mm.yyyy

yes, all are the same