Cursors baaaaad. But sometimes necessary.
Actually, I use the WHILE statement to avoid cursors.
We don't have too much of a call here to use Table variables. And I can remember the sytax for Temp tables much quicker. Especially as I tend to use Temp tables with SELECT INTO commands quite often.
The only problems I tend to have are in the tables I'm pulling the records from (very long and very wide) rather than access time due to the difference between Temp tables and Table variables.
Catadmin - MCDBA, MCSA
"No, no. Yes. No, I tried that. Yes, both ways. No, I don't know. No again. Are there any more questions?"
-- Xena, "Been There, Done That"