Bhuvnesh (1/4/2013)
well to me it doesnt look like that this function itself might create some problem.as it doesnt have any kind of comple logc or calculation.
i am taking my words back here , i overlooked the second part (CTE query in my above post).
-------Bhuvnesh----------
I work only to learn Sql Server...though my company pays me for getting their stuff done;-)