Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can someone tell me what's wrong with my 2 codes:
Select
"departement_name"
"line_of_business"
from table1;
Select
"departement_number"
from table2;
if ("table2.departement_number"= '', '4000', "table2.departement_number")
//Some departements have no departement_numbers, and I wish to give them those the number 4000 automaticly within Qlikview//
if ("table1.line_of_business"= 'sales', '1000', as "table2.departement_number")
//Every sales departement must be shown with a 1000 departement number//
thx in advace
How is this?
Select
departement_name,
line_of_business,
if(departement_number ='','4000',if(line_of_business='sales',1000,departement_number)) as DEP_NO
from table1 a
left outer join table2 b
on a.departement_name=b.departement_name;
-- Arun
Nope, does not work. Maybe if we split it into 2 seperate codes?
Hi,
The code given is nly the SQL . You can assocoate this with load. Whether the keys which I used are corerct as per your structure? If so, it should work.
_Arun