Page 1 of 1

To identify set of records

Posted: Thu Sep 27, 2012 3:42 am
by Cherukuri
Question:
I have a data like :

PlNo ItmNo

LS8 AB
LS8 AB
LS5 CD
LS5 CD


I need the data like :

Identity PlNo ItmNo

1 LS8 AB
1 LS8 AB
2 LS5 CD
2 LS5 CD


Could experts help to give a solution for this.

Thanks.
Cheru.

Posted: Thu Sep 27, 2012 5:03 am
by bhasds
Hi Cherukuri,

you can use 3 stage variables-


In stage variable-

Derivation Satage Variable

If col1<>SV2 And col2 <>SV3 Then SV1+1 Else SV1 SV1(initialize by 0)

col1 SV2(initialize by 0)

col2 SV3(initialize by 0)


In output-

In the third column derivation take the out put from SV1

Posted: Thu Sep 27, 2012 6:18 am
by BI-RMA
Use a sort-stage and set the option "Create Key Change Column" to yes. Sort by PlNo and ItmNo. In a Transformer behind this evaluate Column KeyChange in a StageVariable.

If InputLink.KeyChange = 1 Then svIdentity +1 Else svIdentity

Posted: Thu Sep 27, 2012 7:28 am
by chulett
<moved from FAQ Discussions>

Next time please be more careful where you start your post.

Posted: Fri Sep 28, 2012 12:58 am
by Cherukuri
Hi bhasds

I tried your logic its worked fine.. :D

Thank you very much for your time and help.

Hi BI-RMA, Thank you for your inputs and am gone try your logic aswell.

Regads,
Cheru.