Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I've got problem with SQL selects - I've got 4 selects, but Qlik loads only first one. I've tried putting joins between them, but none worked yet.
My code looks like this:
Data:
SQL SELECT * FROM QV_FAB_1(201501);
LEFT JOIN (Data)
SQL SELECT * FROM QV_FAB_2(201501);
LEFT JOIN (Data)
SQL SELECT * FROM QV_FAB_3(201501);
JOIN
SQL SELECT * FROM QV_FAB_4;
I tried doing something like this:
Data:
SQL SELECT * FROM QV_FAB_1(201501);
Data2:
SQL SELECT * FROM QV_FAB_2(201501);
And it wasn't working.
My final target is to get this SQL tables and write them into .qvd, it works but only for first select, columns from 2, 3, and 4 don't exist in Qlik.
I don't beleive you need the SQL bit in your script
ie the below should work.
Data:
SELECT * FROM QV_FAB_1(201501);
Data2:
SELECT * FROM QV_FAB_2(201501);
HI
Check your Table Data
While you are doing a left Join you all four SQL tables Joined together into one single table
I don't beleive you need the SQL bit in your script
ie the below should work.
Data:
SELECT * FROM QV_FAB_1(201501);
Data2:
SELECT * FROM QV_FAB_2(201501);
That is if you want seperate tables
When i'm doing this:
Data:
SELECT * FROM QV_FAB_1(201501);
Data2:
SELECT * FROM QV_FAB_2(201501);
fields from QV_FAB_1 are good and everything is OK, but from QV_FAB_2 there are only empty names of columns, without any data.
This should work, is there definately data in the tables?
Sounds like what you're looking for is
SELECT * FROM TABLE1;
CONCATENATE
SELECT * FROM TABLE1;
etc.
That said, you should avoid using select * when using JOIN or CONCATENATE - type out the columns to make sure at least one has the same name so QlikView knows what column(s) to merge on.
OK, you're right. I messed up and procedure returned nothing, thank you for helping me.
No problem.