Code: Select all
StudentID Grade
----------- ------
111 B
222 A
222 C
111 B
111 A
Now, I need to transform the file into -
Code: Select all
StudentID Grade
----------- ------
111 B B A
222 A C
I have tried to tackle the problem by sorting my data, then using stage variables to keep record of previous values. Use RowProcCompareWithPreviousVal() function, then pass it through Aggregator, GROUP BY StudentID and return the Last(Grade). But it seems to fail when the number of records are more than two. Please suggest.