Viewing 5 posts - 1 through 5 (of 5 total)
I've used a twist on the above use of CASE for controlling the WHERE clause depending on the values of input parameters. Something like:
SELECT *
FROM MyTable
WHERE Col1 =...
November 17, 2004 at 9:03 am
Since "views are essentially macros which are expanded by the query optimizer into derived tables" without the stored execution plan of a stored procedure, you could get around this by creating...
November 15, 2004 at 7:51 am
Like Yukas said, you could rewrite the SP as a UDF.
Another alternative would be to keep your SP, but revise it to use a table variable instead of a temp...
September 21, 2004 at 10:10 am
I've also heard that cursors are generally not fast, but for many of the things I've been writing lately, I've used cursors a lot. An alternative I've come across is...
April 7, 2004 at 9:40 am
Profiler is a good tool, but what I use more often--especially with complex triggers is a custom log table, sort of like your own custom profiler. Typically, I'll create the...
February 16, 2004 at 7:32 am
Viewing 5 posts - 1 through 5 (of 5 total)