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

Help on joining two tables with duplicate keys.

Hi guys please se my sample date below:

Amount:
Document No.Item No..DescriptionAmount
20110129044050P/N:A Screw    200.00
20110129044050P/N:B Screw    300.00
20110129044050P/N:B Screw    350.00

Quantity:
Document No.Item No.DescriptionQuantity
20110129044050P/N:A Screw1
20110129044050P/N:B Screw5
20110129044050P/N:B Screw20

Output:
Document No.Item No.DescriptionAmountQuantity
20110129044050P/N:A Screw    200.00 1
20110129044050P/N:B Screw    300.00 5
20110129044050P/N:B Screw    350.00 20

My problem is I can't find a unique key to use so that I can put the quantity only once, since the Item No. is the same for all lines and there are two same Description.

When I load the two tables the amount and quantity are being take up twice.

Hope you can give me idea on this so that table B will be link to Table A only once.

Regards,

~Skip

2 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

    Table1:

    Load

           RecNo() as Key,

           Document No,

           Item No,

          Description,

          Quantity

     From.. Order By [Document No],[Item No],Description;

     Table2:

     Load

           RowNo() as Key,

           Document No,

           Item No,

          Description,

          Amount

      From..Order By [Document No],[Item No],Description;

Inner Join(Table1)

Load

     Key,

     Amount

Resident

     Table2;

Drop Table Table2;

Hope it helps

Celambarasan

Previously I wrongly Deleted the table1.Now i updated the correct one. Message was edited by: Celambarasan Adhimulam

Not applicable
Author

Hi,

I will look into this sample.. thanks for your reply.

regards,

~skip