Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is there a way to do a "or" statement in "where" clause while loading qvd? for example I have Table_A & Table_B which will be joined by a master_key. If I do:
Load *
Table_A
Where Table_A.Col1 is not null ;
Load *
Table B
Where Table_B.Col2 = "XYZ";
it works as "and" statement.
I want something like
Load *
Table_A;
Load *
Table B;
Where Table_A.Col1 is not null or Table_B.Col2 = "XYZ"
Any suggestion would be much appreciated. Thanks in advance
Hi
Try like below
MainTable:
Load * , Col1 from tableA;
Left join (MainTable)
Load * , Col2 from tableB ;
FinalTable:
NoConcatenate
Load *
resident MainTable where (not isnull(Col1) or Col2 = 'XYZ');
Drop table MainTable;
In Qlik,instead of "Table_A.Col1 is not null" , need to use "not isnull(Col1)".
Hi,
You need to bring both the columns into one table first using join. And then apply or in where condition.
E.g
MainTable:
Load * , Col1 from tableA;
Left join (MainTable)
Load * , Col2from tableB
FinalTable:
Load *
resident MainTable where Col1 is not null or Col2 = "XYZ"
Thanks,
Ashutosh
Hi
Try like below
MainTable:
Load * , Col1 from tableA;
Left join (MainTable)
Load * , Col2 from tableB ;
FinalTable:
NoConcatenate
Load *
resident MainTable where (not isnull(Col1) or Col2 = 'XYZ');
Drop table MainTable;
In Qlik,instead of "Table_A.Col1 is not null" , need to use "not isnull(Col1)".
Thanks for the correction @MayilVahanan ,
I missed that part to correct
Thanks, it worked!
Thanks!