Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to inner join on a specific field

Good day gyus How do I inner join 2 table on a specific field. I have the following data. How would the script look like if I want to join them on DocEntry??

SQL SELECT CardCode,DocDate,DocEntry,DocNum,DocType FROM "SBO_O_SA1".dbo.OPDN;

SQL SELECT DocEntry,LineTotal,Quantity,ItemCode FROM "SBO_O_SA1".dbo.PDN1;

1 Solution

Accepted Solutions
Not applicable
Author

Hi Christo.

Tab1: // Name the table, so you can join it
SQL SELECT CardCode,DocDate,DocEntry,DocNum,DocType FROM "SBO_O_SA1".dbo.OPDN;

INNER JOIN (Tab1) // Join Tab1
Load DocEntry,LineTotal,Quantity,ItemCode; // Preceeding load, you join via DocEntry.
SQL SELECT DocEntry,LineTotal,Quantity,ItemCode FROM "SBO_O_SA1".dbo.PDN1;

Kind regards, Miha

View solution in original post

4 Replies
Not applicable
Author

Hi Christo.

Tab1: // Name the table, so you can join it
SQL SELECT CardCode,DocDate,DocEntry,DocNum,DocType FROM "SBO_O_SA1".dbo.OPDN;

INNER JOIN (Tab1) // Join Tab1
Load DocEntry,LineTotal,Quantity,ItemCode; // Preceeding load, you join via DocEntry.
SQL SELECT DocEntry,LineTotal,Quantity,ItemCode FROM "SBO_O_SA1".dbo.PDN1;

Kind regards, Miha

Miguel_Angel_Baeyens

Hello Christo,

I may have misunderstood your question but, since QlikView joins tables (links them) when both share a field with same name, I don't think forcing a join would be necessary in this case. It'a just enough to keep fields with the same name

Hope that helps.

Not applicable
Author

Thank you both for the help.

I know that Qlikview joins automatically. But I needed to INNER JOIN in some instances.

This was only a simple example.

Regards

venkat1
Creator II
Creator II

Hi ,

i have a question 

what if i want to join only specific row that is not there in the another table 

For example ,

Table A had fields like Emp , id, name ,role

Table B had : date,place.

now my final table should look like : Emp,id,name,role,place.

How it was possible ?