Hi
I have a particular requirement in which there is a need to discard records based on whether the resultant sum of a particular field is zero.
Please find the input file below
BHASKAR 29| 10
BHASKAR 29| 00
BOSE 29| 00
BOSE 29| 00
NATU 27| 00
NARESH 27| 12
The key is from the start of the record till the pipe character '|'.
The requirement is to sum the records based on the key and then discard the records which give zero sum.
The output in this case should be
BHASKAR 29| 10
BHASKAR 29| 00
NARESH 27| 12
Note that in above case the second record did not get discarded because for the same key non zero value exists.
Please help on the same
_________________
Sujith