Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Anonymous
Not applicable
Author

where "datum_auftrag" is not null

View solution in original post

24 Replies
ashfaq_haseeb
Champion III
Champion III

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
Author

Maybe

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

Not applicable
Author

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
Author

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

eduardo_sommer
Partner - Specialist
Partner - Specialist

Or,

Where "datum_auftrag" is not null

Eduardo

rbecher
MVP
MVP

Hi Jan,

try this:

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

Astrato.io Head of R&D
Anonymous
Not applicable
Author

where "datum_auftrag" is not null

Not applicable
Author

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

Not applicable
Author

dd.mm.yyyy

yes, all are the same