Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to fetch the duplicate values in two tables

hi All,

I have two tables in that tables having some duplicate values...how to get those duplicates in a separate list...

Example:

File1:                                                    file2:

barcode         values                              barcode                        values

1                       234                                 1                                   -

2                       567                                  3                                   -

3                        675                                  5                                  465

4                       452                                    6                                 -

5                        -                                       7                                  -

7                         -

Excepted output:

barcode        values

1                  

3

5

Hi all,

inner join working properly...its getting common values of the both tables it shows but don't need  all the duplicates......I need

in first file the bar code having some value but the same barcode in second file don't have any value so   I need only those duplicate values.

so identify that barcodes separately...

regards thanks

Ravi....

please help me its urgent for me..............

19 Replies
sunny_talwar

You need this in the script or front end?

vikasmahajan

you can use left join

Tablea:

load * from  File1

left join(Tablea)

Load * from File2 ;

o/p

barcode         values                           

1                       234                               

2                       567                               

3                        675                              

4                       452        

5                       465

7

8

.

.

.

Etc                     

HTH

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
sujeetsingh
Master III
Master III

use join for all the tables based on Bar Code and keep all the values as ValueFromTable1,ValueFromTable2 and ValueFromTable3. now just use the business logic you want. Like take the max value or sum all values or the prioritised value.

HirisH_V7
Master
Master

Hi,

is this what you want,

Data:

LOAD * INLINE [

    BarCode, Values

    1, 234

    2, 567

    3, 675

    4, 452

    5

];

Data2:

Inner Join

LOAD * INLINE [

    BarCode, Values1

    1

    3

    5, 465

    6,

    7

];

Output:

Duplicate Values of Fields-213083.PNG

HTH,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
maniram23
Creator II
Creator II

Hi,

QUALIFY *;

UNQUALIFY barcode;

T1:

load * inline [

barcode      ,   values                                                     

1             ,          234                                                                   

2               ,        567                                                                   

3              ,          675                                                                 

4               ,        452                                       

5                ,        -                                 

];

  Inner join(T1)

T2:

load * inline [

barcode   ,               values

1          ,                         -

3           ,                        -

5            ,                      465

6             ,                    -

7              ,                    -

] ;

UNQUALIFY*;

Not applicable
Author

hi sunny,

I need in script level......I no need all the duplicates......

in first file the bar code having some value but the same barcode in second file don't have any value.

so identify that barcodes separately...

Not applicable
Author

Hi all,

inner join working properly...its getting common values of the both tables it shows but don't need  all the duplicates......I need

in first file the bar code having some value but the same barcode in second file don't have any value so   I need only those duplicate values.

so identify that barcodes separately...

Not applicable
Author

use the join function it don't take any duplicates and take all fields a unique by combining the data.

Kushal_Chawda

what is expected output?