Luis Cazares (3/2/2015)
This is going to be slow.You might gain speed with an additional order column. It could be a persisted computed column.
+1
that way you can include it in indexes etc...
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?