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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join from two tables using 3 fields!!!

Hi All

I have two tables.

with fields   table1:  id, field1

table2:  recno,field1,field2

now i want the records those are match with table1.field1=table2.field1 and table2.field=100.

please help two write load script in qlikview.

Table1table2
idfield1recnofield1field2
1111100
2222200
3333200
4444300
5151400
6262100
7373100
8484100
9191100
102102100
113113100
124124200
131131300
142142400
153153500
164164100
1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

try below.

Table1:

load * Inline

[

id,field1

1,1

2,2

3,3

4,4

5,1

6,2

7,3

8,4

9,1

10,2

11,3

12,4

13,1

14,2

15,3

16,4

];

Table2:

inner join

load * Inline

[

Recno,field1,field2

1,1,100

2,2,200

3,3,200

4,4,300

5,1,400

6,2,100

7,3,100

8,4,100

9,1,100

10,2,100

11,3,100

12,4,200

13,1,300

14,2,400

15,3,500

16,4,100

]where field2=100 and Exists(field1,field1);

Regards

ASHFAQ

View solution in original post

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

My example

ashfaq_haseeb
Champion III
Champion III

Hi,

try below.

Table1:

load * Inline

[

id,field1

1,1

2,2

3,3

4,4

5,1

6,2

7,3

8,4

9,1

10,2

11,3

12,4

13,1

14,2

15,3

16,4

];

Table2:

inner join

load * Inline

[

Recno,field1,field2

1,1,100

2,2,200

3,3,200

4,4,300

5,1,400

6,2,100

7,3,100

8,4,100

9,1,100

10,2,100

11,3,100

12,4,200

13,1,300

14,2,400

15,3,500

16,4,100

]where field2=100 and Exists(field1,field1);

Regards

ASHFAQ

sureshbaabu
Creator III
Creator III

Hello,

You can do a 'Inner join Table2  with Table 1 and write the filter condition on Table 2

Table 1:

C1,F1

*,*

Inner Join(Table1)

Table2

C2,F1,F2

*,*,*

where F2=100

Hope this helps!!!

Thanks

Not applicable
Author

Thank you ASHFQ Mohammad.