Discussion Board for collaboration on QlikView Scripting.
I have the following string contained in a field:
I'd like to be able to remove all the duplicate values within this string to end up with:
The string itself will always be in this format, with numbers ascending but can be of any length and have any number of duplicate values. Is there a way to achieve this in the script?
Go to Solution.
You can do this in script something like below:
SubField(SourceStr, ',') as OneValue
Concat(distinct OneValue, ',') as CleanStr
Group by SourceStr;
DROP Table tmpRecords;
Load your field with DIstinct key word
LOAD distinct * Inline
Would something like this help ?
subfield ( String , ',' ) as Sub ,
LOAD * INLINE [
Thanks Ersen, that's exactly what I was looking for.
load * inline [
load newstring, rowno() as id;
load subfield(string, ',') as newstring resident a;
load concat(newstring, ',', id) as newstring;
NoConcatenate load newstring, min(id) as id resident b group by newstring;
drop table b;