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: 
Not applicable

How to remove double entires on LOAD based on one field only

Hey,

I need to read an xls file with ZIP codes and coordinates. However there are multiple entries for every ZIP code. How can I load only the first entry and ignore the folowing ones with the same ZIP. LOAD DISTINCT does not work becuase the records have different coordinates and thus are beeing treated as different records.

Best regards,
Georg

1 Solution

Accepted Solutions
Not applicable
Author

Thanks for pointing me in the right direction.

In fact it is just ...

LOAD A, B, C FROM Table WHERE NOT EXISTS(A);
(
Taken from the QlikView manual.)

or im my case I could even do

LOAD A, B, C FROM Table WHERE NOT A = PREVIOUS(A);



Regards,
Georg

View solution in original post

2 Replies
jlassell
Partner - Contributor II
Partner - Contributor II

zipcodes:

load

zip, zip as dupzip, long, lat

where not exists(dupzip,zip)

from zipcoords;

drop field dupzip from zipcodes;

Not applicable
Author

Thanks for pointing me in the right direction.

In fact it is just ...

LOAD A, B, C FROM Table WHERE NOT EXISTS(A);
(
Taken from the QlikView manual.)

or im my case I could even do

LOAD A, B, C FROM Table WHERE NOT A = PREVIOUS(A);



Regards,
Georg