A better way to create a dynamic SQL stored procedure(xerratus.com)
submitted by
xerratus(415) 4 years, 4 months ago
This one has been plaguing me for years: What is the best way to create a dynamic stored procedure that allows null inputs to filter results? Today, while working on another request to come up with a dynamic stored procedure for a specific report a client wants, I had an epiphany. If I use isnull() in conjunction to with the actual value, I can get the desired results, no matter what input(s) are null -if any or all.
|category: Database
|Views: 5
tags:
SQL storedproc Database StoredProcedures another
Everyones tags:
Your Tags: