Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
david_ze
Partner - Contributor III
Partner - Contributor III

How to avoid load dublicate fields

hi,

I would like to load a table from excel by avoiding loading rows having the same data within a certain field (etc TELNUMBER).

The table is as shown below:

TELNUMBER NAME ADDRESS

123456 STEVE WALL-STREET

121221 JOHN NEW-YORK

123456 DAVID WALL-STREET

332211 PETER BOSTON

the script should load only the rows 1, 2 and 4.

I'll appreciate your advice on this.

Regards

David

5 Replies
Not applicable

hi david,

Please find the attachment

Hope this will help you

Regards,

Nitin Jain

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Add a

WHERE NOT EXISTS(TELNUMBER)

to your LOAD statement. That will restrict the load to the first occurance of each TELNUMBER.

-Rob

http://robwunderlich.com

david_ze
Partner - Contributor III
Partner - Contributor III
Author

Thanks Nitin  for the answer.

In case of null in the filed TELNUMBER , I would like to ignore the filltering. Wher should I add the condition in your script?
David

Not applicable

Thnks Rob,

Nice way to remove the duplicate values.

Regards,

Nitin Jain

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You don't have to add anything. Nulls will not participate in exists(), so you will get all rows with null TELNUMBER.

-Rob

http://robwunderlich.com