Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filtering out null data after join

Hej guys,

I'm joining three tables in SQL but after doing so I cannot seem to filter out null values in the new table. Even when using the where clause I get one record for each date before 30-12-2014 with null values for every field. I have the following script:


Temp:
Load
Id,
Run,
Date(Floor(Timestamp(Run, 'D-M-YYYY h:mm:ss')), 'D-M-YYYY') as Date;
SQL SELECT Id, Date
FROM;

Left Join
Load
Id,
Id2;
SQL SELECT Distinct Id, Id2
FROM
Where Status= 'Done' or Status = 'Finished';

Left Join
Load
Id2,
Field1,
Field2,
Number;
SQL SELECT Id2, Field1, Field2, Number
FROM;

Final:
Load
Run&Field1&Field2 as UniqueId,
Date,
Field1,
Field2,
Number
Resident Temp
Where Date >= Date('30-12-2014 0:00:00','D-M-YYYY h:mm:ss');

Drop Table Temp;

5 Replies
alkesh_sharma
Creator III
Creator III

Try This,

Temp:
Load
Id,
Run,
Floor(DATE(Run, 'DD-MM-YYYY')) as Date;
SQL SELECT Id, Run
FROM;

Left Join
Load
Id,
Id2;
SQL SELECT Distinct Id, Id2
FROM
Where Status= 'Done' or Status = 'Finished';

Left Join
Load
Id2,
Field1,
Field2,
Number;
SQL SELECT Id2, Field1, Field2, Number
FROM;

Final:
Load
Run&Field1&Field2 as UniqueId,
Date,
Field1,
Field2,
Number
Resident Temp
Where Date >= Floor(Date(30-12-2014,'DD-MM-YYYY');

Drop Table Temp;

maxgro
MVP
MVP

replace

Where Date >= Date('30-12-2014 0:00:00','D-M-YYYY h:mm:ss');

with

where Date >= Date#('30-12-2014','D-M-YYYY');

Not applicable
Author

Doesn't change a thing

avinashelite

can you please share the app.

Not applicable
Author

Nvm, solved it.

Apparently this was happening because I was using Date in another loaded table as well. Changed that one to Date2. Thanks for the time and responses at least