Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove duplicate lines when outputting to text-file

I have a load script that at the end of the script outputs one of the tables to a text-file. This text-file is then used by another party for things that have nothing directly to do with the QlikView-application.

The table in question contains some duplicate rows. This is fine and makes sense for the application while within QlikView but causes problems in the text-file.

So now I'm wondering if it would be possible to do some sort of pre-processing within the load script so that the duplicates are not printed to the text-file but still remain within the QlikView-application?

1 Solution

Accepted Solutions
Not applicable
Author

Nevermind. Solved it myself by loading to a temporary table and using DISTINCT, then outputting the temp-table to file.

View solution in original post

2 Replies
gandalfgray
Specialist II
Specialist II

Hi

I would build a new table using distinct.

Something like this:

Qualify *; // avoid NewTable to be concatenated w OriginalTable

NewTable:

Load Distinct *

Resident OriginalTable;

Store NewTable into .... (txt);

Drop table NewTable;

hth/gg

Not applicable
Author

Nevermind. Solved it myself by loading to a temporary table and using DISTINCT, then outputting the temp-table to file.