Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
how could I change the below example into one SELECT to get three tables?
Department_1:
SELECT Name, Department FROM Employees WHERE Department = 1;
Department_2:
SELECT Name, Department FROM Employees WHERE Department = 2;
Department_3:
SELECT Name, Department FROM Employees WHERE Department = 3;
Thank you,
Przemek
Hi,
if your qlikview application directly connected with db you can use following SQL statements
SQL Select * from Employees where Department <=3
or
Load * From Emplyees where Department <=3;
Hi ijprakash,
what I mean is to get 3 seperate tables: Department_1, Department_2 and Department_3.
Thank you,
Przemek
Hello Przemek,
in your select order QlikView will generate ONE table with all fields automatically because the table strustures are the same.
To generate three table you need a
noconcatenate load ....
Regards
Hi Martin, good point. I've changed the code and coming back to my question - how to change it into one SELECT and get three tables.
NoConcatenate LOAD Name, Department;
Department_1:
SELECT Name, Department FROM Employees WHERE Department = 1;
NoConcatenate LOAD Name, Department;
Department_2:
SELECT Name, Department FROM Employees WHERE Department = 2;
NoConcatenate LOAD Name, Department;
Department_3:
SELECT Name, Department FROM Employees WHERE Department = 3;
for i = 1 to 3
Department_$(i):
noconcatenate select Name, Department from Emplyees where Department = $(i);
next;
But you will get three identical tables (from the structure)
Regards
Thank you, Martin. I meant sth a bit different but you answer led me to the point.
Regards,
Przemek