Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Table1 | table2 | |||||
id | field1 | recno | field1 | field2 | ||
1 | 1 | 1 | 1 | 100 | ||
2 | 2 | 2 | 2 | 200 | ||
3 | 3 | 3 | 3 | 200 | ||
4 | 4 | 4 | 4 | 300 | ||
5 | 1 | 5 | 1 | 400 | ||
6 | 2 | 6 | 2 | 100 | ||
7 | 3 | 7 | 3 | 100 | ||
8 | 4 | 8 | 4 | 100 | ||
9 | 1 | 9 | 1 | 100 | ||
10 | 2 | 10 | 2 | 100 | ||
11 | 3 | 11 | 3 | 100 | ||
12 | 4 | 12 | 4 | 200 | ||
13 | 1 | 13 | 1 | 300 | ||
14 | 2 | 14 | 2 | 400 | ||
15 | 3 | 15 | 3 | 500 | ||
16 | 4 | 16 | 4 | 100 |
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
My example
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
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
Thank you ASHFQ Mohammad.