Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Finding Duplicates during load

Hi All,

I have two tables with same field names but with data different. The table A contains data for the status 'I' whereas the table B contains data for the status 'R' but the name might be the same in both the tables.

The issue is the Name field should be only one with status 'I' given priority. How will i avoid loading the same Name for the status 'R' ?

The table structure is this:

Table A:

ID,

Name,

Status = 'I',

Date

Concatenate

Table B:

ID,

Name.

Status = 'R'

Date

Kindly let me know if the requirement is not clear

Thanks,

Anupama Jagan

4 Replies
Anil_Babu_Samineni

May be use

Where Status <> 'R';

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
swuehl
MVP
MVP

Maybe using NOT EXISTS():

Table A:

LOAD

ID,

Name,

Status,

Date

FROM  TableA;

Concatenate

LOAD

ID,

Name.

Status,

Date

FROM TableB

WHERE NOT EXISTS(Name);

Anonymous
Not applicable
Author

No that will eliminate all records with status R . I want data to be there for status R . I only want to eliminate any records which is already there for status 'I' and again repeating for the status 'R'

For example if

Table A:

ID     Name     Status    Date

1        ABC        I           05/17

2       XYZ         I             06/17

TableB:

ID     Name     Status    Date

10        ABC        R           08/17

20        SFG         R             09/17

while concatenating i should get

ID     Name     Status    Date

1        ABC        I           05/17

2       XYZ         I             06/17

20        SFG         R             09/17

can you now get it?

Anil_Babu_Samineni

Seems, Working as suggested by Stefan

Capture.PNG

[Table A]:

Load * Inline [

ID,    Name  ,  Status,    Date

1  ,      ABC,        I  ,        05/17

2  ,    XYZ,        I  ,          06/17

];

Concatenate

TableB:

LOAD * Where Not Exists (Name);

LOAD  * Inline [

ID    , Name    , Status,    Date

10    ,  ABC ,      R ,          08/17

];

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful