Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

Concatenating two tables

Hi All,

Table1:

InvooiceNoCustCodeProdCode
110100
220200
330300
440400

Table2:

InvoiceNoCustCodeProdCode
110100
220200
990300
880400
550500
660600
770700

Table3:

InvoiceNo
Table1.CustCode
Table2.CustCode
11010
22020
330-
440-
5
50
6
60
7
70
8
80
9
90

how to achieve Table3 from table 1 and table2?

Thanks.

13 Replies

Re: Concatenating two tables

Hi,

See the attached sample file.

HTH

Rgds

Anand

Concatenating two tables

Hi,

    Try this code.

Data1:

load * inline [
InvoiceNo, CustCode, ProdCode
1, 10, 100
2, 20, 200
3, 30, 300
4, 40, 400
];


Data2:

Load * inline [
InvoiceNo, CD, PD
1, 10, 100
2, 20, 200
9, 90, 300
8, 80, 400
5, 50, 500
6, 60, 600
7, 70, 700
];

Regards,

Kaushik Solanki

rohit214
Contributor III

Re: Concatenating two tables

hey sandeepa

plaese find the attachment.

thanks

rohit

Not applicable

Re: Concatenating two tables

Thanks all for the response.

Suppose I have:

InvooiceNoCustCodeProdCode
110100
220200
330300
440400

Table2:

InvoiceNoCustCodeProdCode
110100
220200
990900
880800
550500
660600
770700

Table3:

ProdCodeBrandCodeBrandName
100000xxx
200001yyy
300002zzz
400003aaa
500004bbb
600005ccc
700006ddd
800007eee
900008fff
1000009ggg

What I have to do is If I click on BrandName it should provide me the details of prodcodes and customers and differences as well.

Here count(tab1.custcode)=4

and count(tab2.custcode)=7.

Matched is 2.  Suppose A=Count(Tab1.CustCode) and B=Count(Tab2.CustCode). I also have to show A-B and B-A.

Please Suggest.

Re: Concatenating two tables

Hi,

You need to load a data some thing like that the InvoiceNo connected to each other among table and also Productcode will be connected to each other then you get difference like

A-B = 2

B-A = 7

Rgds

Anand

SunilChauhan
Esteemed Contributor

Concatenating two tables

Join table A and Table 2

and link table 3

and calulate what eveer you want

SunilChauhan
Esteemed Contributor

Concatenating two tables

sorry

Join table A and Table 2

and link to table 3 by ProdCode

and calulate what eveer you want

Not applicable

Re: Concatenating two tables

Hi,

Can you please provide me with a qvd model.

Thanks.

SunilChauhan
Esteemed Contributor

Concatenating two tables

table1:

Load

field1,

field2,

.

.

from table1;

table2:

Join(table1)

Load

field1,

field2,

from

table2;

table3:

Load

field1,

field2,

from table3;