Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Left join 3 Tables

Hello,

Try to load part of table into QlikSense, but there is no examples about join in SQL queries.

I try to use standart sql syntax, but engine return error. What is wrong?

SQL SELECT "Sales_Date",

    "Doc_Type",

    "Doc_ID",

    "REP_id",

    "SKU_ART"

FROM Sales.dbo.Sales as t1 left join Sales.dbo.SKU t2 on t1.SKU_ART = t2.SKU_Art

left join Sales.dbo.REP t3 on t1.REP_id=t3.REP_id

where t3.REP_Department like 'abc' OR t2.P_Format like '123';

5 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Everything after the "SQL" to the terminating semi-colon is passed as a SQL statement to your DBMS. Any error that you get is an error on the DBMS, not in Sense. The join is also happening in the DBMS, not in Sense.

You will need to understand what error you are getting to fix the problem.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

error 209, something about column name

Is my syntax for query correct?

Not applicable
Author

When i try to use this query on SQL without Qlik -- all is OK.

jonathandienst
Partner - Champion III
Partner - Champion III

The syntax is correct, but it seems you are referring to a column name that is misspelled or doesn't exist or is an type error (whatever "something" means). As I said, this is not a Sense error, this is a SQL error. Fix the SQL query and the load statement will work.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
jonathandienst
Partner - Champion III
Partner - Champion III

>>When i try to use this query on SQL without Qlik -- all is OK.

Then the problem is most likely that you are connecting with different credentials.Are you using Sense server? Make sure that the Sense service account has access to all the tables referenced in the SQL statement,

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein