Bunch's Blog

One day I'll have a catchy subtitle, one day
posts - 87 , comments - 126 , trackbacks - 0

April 2011 Entries

Cycling Through Selected CTE Values
A great benefit of using a CTE is their ability to replace some uses of Cursors. Sometimes you may need a Cursor to fetch an ID value from a table. Use that ID in a Select statement. Then fetch the next ID value, use that in the same Select statement over and over again until you ran through all the ID values. A CTE can help eliminate that and from what I can see is generally a bit faster than using a Cursor. This example is using a table to hold purchase orders (tblPO) and another table to hold ......

Posted On Wednesday, April 13, 2011 1:05 PM | Comments (0) |

Powered by: