Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Why doesnt work NESTED JOINS in SQL SELECT

Hi, Im using the SQL SELECT join, because my tables have a lot of entries and I just wanna filter some of them. If I use the LOAD or qlikview joins I get the join just fine, but I cant avoid the whole scan of the table of the DB. I also used the option of LOAD WHERE EXIST but still takes a lot of time.

So I have this and works like charms:

TEST_JOIN:

SQL SELECT *

FROM myDB.TABLE1 A INNER JOIN myDB.TABLE2 B ON A.USER = B.PARTNER

WHERE A.COORD  = 'TEST'

AND      A.ACTIVO = 'X';

But I dont know why when I add a new nested join it doesnt work, I get "OLEDB read failed"

TEST_JOIN2:

SQL SELECT *

FROM ( myDB.TABLE1 A INNER JOIN myDB.TABLE2 B ON A.USER = B.PARTNER )

                                       INNER JOIN myDB.TABLE3 C ON B.PARTNER_GUID = C.PARTNER_NO

WHERE A.COORD  = 'TEST'

AND      A.ACTIVO = 'X';

Also tried without the "(" ")"

SQL SELECT *

FROM  myDB.TABLE1 A INNER JOIN myDB.TABLE2 B ON A.USER = B.PARTNER

                                     INNER JOIN myDB.TABLE3 C ON B.PARTNER_GUID = C.PARTNER_NO

WHERE A.COORD  = 'TEST'

AND      A.ACTIVO = 'X';

Doesnt work either.

Im still pretty newbie in qlikview, I know that qlikview first scan and fetch the SQL select statment and then apply the LOAD and makes the joins by itself, i just wanna be able to "filter" somehow the entries. And this it isnt because Im stubborn my problem is becasue I connect via a VPN to the DB, so when Im not on the same building where the DB is it takes FOREVER to run the script.

Thx

1 Reply
hic
Former Employee
Former Employee

QlikView sends the entire SELECT statement (as a string) to the OLE DB provider, so if you get an error, it's because the OLE DB provider doesn't support the syntax/construction. QlikView does nothing to interpret the SELECT.

HIC