Creator
Creator

Re: Manter apenas caracteres distintos

Segue o script.

Base:

LOAD 'aaaaaaaaaaaaabbbbbbcccjjjjasgsudyga'        as campo,

     Len('aaaaaaaaaaaaabbbbbbcccjjjjasgsudyga')    as qtde

AutoGenerate 1;

While:

LOAD Mid(campo, IterNo(), 1)    as sep,

     campo,

     qtde

Resident Base

While IterNo() <= qtde;

DROP Table Base;

Distinto:

LOAD Concat(Distinct sep)        as separados

Resident While;