Page 1 of 1

reject records.

Posted: Fri Nov 03, 2006 2:30 pm
by adams06
Hi

TYPE NAME

C 300
A 100
A 100
B 100
A 200
B 200
D 500
B 600
E 700

I HAVE TO ERROR OUT THEM WHEN THE SAME NAME HAS DIFFERENT TYPES

A 100
A 100
B 100

I HAVE TO ERROR OUT THEM WHEN THE SAME NAME HAS DIFFERENT TYPES

A 200
B 200

How to solve this, i have tried using RowProcCompareWithPrevious value.

Any idea !

Thanks.

Posted: Fri Nov 03, 2006 3:05 pm
by I_Server_Whale
Hi Adams,

I'm thinking if you sort by NAME, TYPE and then using "RowProcCompareWithPrevious value" would help.


Because, when you sort you can get the records in the form:



Code: Select all


NAME   TYPE

100        A
100        A
100        B
200        A
200        B
500        D
600        B
700        E

Let me know your feedback.

Thanks,
Whale.

Posted: Fri Nov 03, 2006 3:24 pm
by ray.wurlod
If they're sorted by NAME you can do it in a Transformer stage using stage variables, and avoid the overhead of calling a Routine. One pair of variables can detect the change in values in NAME, while another can keep track of the TYPE most recently seen for that NAME. Constraint expressions direct output rows accordingly.