Hi Mihit,
Thank you for a nice example on how to get yourself away from bad table design, when retaining backwards compatibility.
What you could also have shown was the use of Insert Instead-of triggers, so that the view was updateable. Then you would have had 100% backwards compability.
I also wondered over your use of a cursor, but I thought that was because the set-based solution cannot garantee an ordered result.
Best regards,
Henrik Staun Poulsen
Denmark