Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Remove duplicate lines when outputting to text-file

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

2 Replies
gandalfgray
Valued Contributor

Re: Remove duplicate lines when outputting to text-file

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

Remove duplicate lines when outputting to text-file

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

Community Browser