>>I'm thinking about it. On the other hand, if I do that, my SQL will become not SQL Server compatible, since I'm joining temp cursor with my real tables.
>
>It will be if you use derived table instead of a cursor.
I see. In other words, If we would switch to SQL Server, this procedure would have to be re-written as SP and we would need to use derived tables.
If it's not broken, fix it until it is.
My Blog