Page 1 of 1

Removing Duplicates

Posted: Thu Nov 25, 2010 10:18 am
by arnie_nits
Hi,

I want to get rid of any number of duplicates.

example.

111,111,111,111

should be
111,91110,91111,91112

There can be any number of duplicates.

Please suggest.

Regards,

Posted: Thu Nov 25, 2010 10:20 am
by ArndW
Is this in one field, i.e. in one string and duplicates are defined by commas?

Posted: Thu Nov 25, 2010 10:48 am
by arnie_nits
Hi,

This is in one field and no commas.

it comes in rows.

Posted: Thu Nov 25, 2010 11:07 am
by karthi_gana
can you post your requirement clearly?

Posted: Thu Nov 25, 2010 11:16 am
by arnie_nits
id
111
111
111
111

required result
id
111
9110
9111
9112

Posted: Thu Nov 25, 2010 12:41 pm
by chulett
That doesn't really explain much. :?

Can you spell out your requirements in words? It seems you need to take duplicate values and prefix them with a '9' and then... ???

Posted: Thu Nov 25, 2010 1:21 pm
by ray.wurlod
Do it with stage variables in a Transformer stage. Detect that the value is the same as in the previous row. If so, add prefix and suffix, and increment the stage variable that contains the suffix.