kapil_kk (3/16/2013)
I have solved it..... forget to initialize the IsBookelet variable value ;-):w00t:
You might solve it, but if you did it based on your CURSOR/LOOP solution, then it's just a great example of "How NOT to code in T-SQL"
It's especially frustrating, since you've been advised on this subject during the last few days...