Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Flexible Select Procedure

    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 =...

  • RE: Views vs Stored Procs

    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...

  • RE: Using multi-row resultset from a stored procedure directly

    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...

  • RE: Cursors - need to help to explain why to not use them

    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...

  • RE: How do you debug a trigger?

    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...

Viewing 5 posts - 1 through 5 (of 5 total)