Ya thats true ,Mike wrote:Be aware that if you do it all within the transformer, you run the risk of "losing" your last output row (in the case where your number of input rows is not an even multiple of 5). When doing an aggregation entirely within a transformer, you usually need to detect an "End Of File" condition so that you can output that last row.
Mike
so to avoid this we can declare another stage variable
If @INROWNUM/5=0 then 1 Else stagevariable+1 = count
now stagevar4=If @INROWNUM/5=0 then stagevar3/5 Else stagevar3/count-1
This will take care of last ouput row.