Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using INNER JOIN/LEFT OUTER JOIN in QlickView

Hello everyone,

I am very new to Qlickview and I am loving it. I am trying to do some reports for my sales department but I am currently stuck where I cannot join tables when I am in EDIT SCRIPT. I cannot seem to get it to work. I get an error saying Incorrect syntax near WHERE.

SQL SELECT * FROM NETSIS2014.dbo."VW_SATISTESLIM10"

LEFT OUTER JOIN TBLCASABIT WHERE TBLCASABIT.CARI_KOD=VW_SATISTESLIM10.ALTBAYI;

Sincerely,

1 Solution

Accepted Solutions
Not applicable
Author

Edited my post. Got it to work. In case someone needs it;

SQL SELECT V.*, C.CARI_ISIM AS ALTBAYIISIM FROM TABLE1 V

LEFT OUTER JOIN TABLE2 C

ON C.CARI_KOD=V.ALTBAYI;

View solution in original post

10 Replies
anbu1984
Master III
Master III

Replace where by ON

SQL SELECT * FROM NETSIS2014.dbo."VW_SATISTESLIM10"

LEFT OUTER JOIN TBLCASABIT ON TBLCASABIT.CARI_KOD=VW_SATISTESLIM10.ALTBAYI;

Not applicable
Author

In QlikView, we don't require to write the field names on which to perform join as here u have mentioned TBLCASABIT.CARI_KOD=VW_SATISTESLIM10.ALTBAYI.

QlikView automatically joins the tables based on similar field name like:

SQL select ID,name from table1;

left join

SQL select ID,age from table2;

Here it will automatically join 2 tables based on field ID.

In ur example after left outer join u again need to write the select statement.

Hope this will help u..!

Not applicable
Author

Have you generated QVD's??

Not applicable
Author

I am new so I don't know what QVD means?

Not applicable
Author

Edited my post. Got it to work. In case someone needs it;

SQL SELECT V.*, C.CARI_ISIM AS ALTBAYIISIM FROM TABLE1 V

LEFT OUTER JOIN TABLE2 C

ON C.CARI_KOD=V.ALTBAYI;

Not applicable
Author

That is great to know thank you, but those tables field names are not the same sadly

Not applicable
Author

If the field names are npot same u can rename it using 'as' keyword and make the alias of the same like in ur problem:

SQL SELECT ALTBAYI as CARI_KOD  FROM NETSIS2014.dbo."VW_SATISTESLIM10"

LEFT OUTER JOIN select * from TBLCASABIT;

Hope this will help u..!

Not applicable
Author

Tried but didn't help. I got it to work tho

Not applicable
Author

Can u post ur application?