Welcome to TechNet Blogs Sign in | Join | Help

Browse by Tags

All Tags » Optional Parameters   (RSS)

Optional Parameters: Adam Hopes I'm Joking, But The Joke's On Me

This is absolutely my last gasp on optional parameters. Adam Machanic left some syntax in a comment here which shows just how far off base my "last gasp" in this post was. My syntax produced 594 logical reads to resolve a query while the equivalent dynamic

Database Programming: One Last Gasp On Optional Parameters

July 12 update: Everything that follows is WRONG . See Adam's comment and my follow-up . You might think I'm obsessing over this, and you may well be right, but I wanted to make one more comment about handling optional parameters. The issue with the syntax

Database Programming: No Better Options For Optional Parameters

Well, the current leg of the great "optional parameter code-off" has been completed. You definitely want to party with me on a national holday. :) Previous posts in this thread (many filled with questionable advice, as least that coming from me) may be

Database Programming: Nearing Capitulation On Optional Parameters

Adam and Tony both left comments indicating that either flavor of my proposed optional parameter syntax will result in a table scan, and that performance will (to appropriate Tony's characterization) suck. That's quite correct. There's one more syntax

Database Programming: An Incrementally Better Mousetrap For Optional Parameters

enderC points out that the syntax I proposed in last night's post on optional parameters can be made more readable thusly.. SELECT x FROM dbo . foo WHERE COALESCE ( y1 , @constant ) = COALESCE ( @p1 , y1 , @constant ) AND COALESCE ( y2 , @constant ) =

Database Programming: Optional Parameters Revisited

Frequent visitors might recall a thread earlier in the spring regarding optional parameters to a stored procedure (the earlier posts are here , here , and here ). The question had basically boiled down to whether there was single-statement syntax available

Database Programming: Just What Were Those Performance Implications, Anyway?

The performance implications of a recently discussed technique for passing optional parameters to a stored procedure are clarified.
 
Page view tracker