sequence number
Posted: Mon Jul 24, 2006 10:58 am
Hi,
here is the input data:
X Y Z
A B C
A B C
A B C1
A B C1
A B C2
A B C2
A B C3
i need to generate the no
For the first two records i need to generate 1 in column no
For the 3rd and 4th records i need to generate 2 in column no
For the 5th and 6th records i need to generate 3 in column no
For the 7th records i need to generate 4 in column no
when ever there is a change in z then the no should change.
my out put should look like this
X Y Z nO
A B C 1
A B C 1
A B C1 2
A B C1 2
A B C2 3
A B C2 3
A B C3 4
I HAVE WRITTEN THIS CODE ITS NOT GIVING THE EXPECTED RESULT
IF RowProcCompareWithPreviousValue(TRIM(X):TRIM(Y):TRIM(Z)) THEN test1 ELSE 1 STAGEVARIABLE
STAGEVARIABLE+1 test1
Can some one help me out.
Thanks in Advance.
here is the input data:
X Y Z
A B C
A B C
A B C1
A B C1
A B C2
A B C2
A B C3
i need to generate the no
For the first two records i need to generate 1 in column no
For the 3rd and 4th records i need to generate 2 in column no
For the 5th and 6th records i need to generate 3 in column no
For the 7th records i need to generate 4 in column no
when ever there is a change in z then the no should change.
my out put should look like this
X Y Z nO
A B C 1
A B C 1
A B C1 2
A B C1 2
A B C2 3
A B C2 3
A B C3 4
I HAVE WRITTEN THIS CODE ITS NOT GIVING THE EXPECTED RESULT
IF RowProcCompareWithPreviousValue(TRIM(X):TRIM(Y):TRIM(Z)) THEN test1 ELSE 1 STAGEVARIABLE
STAGEVARIABLE+1 test1
Can some one help me out.
Thanks in Advance.