Hi Nabheet,
Thanks a lot!!..Seems like a good idea..i missed thinking of using an Index table to maintain the FROM/TO Index.
Also if you can answer,Modifying the same table which is looping won't turn performance scary right?..(Just confirming.:) ).