August 15, 2011 at 8:53 am
We need a way for users to search a particular SQL table. The request is for the ability to search using 15 different fields. Would setting up this type of report in Report Builder be a good idea? The report could have between 1 to 15 different search possibilities. I'm not sure how I would setup the parameters in the WHERE clause so that one field could be blank and another could have a particial search. For example, foldername LIKE '%' +@foldername + '%'. What if the user left that field blank. 'Allow blank value' in the parameter properties in Report Builder is not enough.
August 15, 2011 at 10:09 am
In a stored procedure, you should just set a default value of '' on your input parameters and that will probably do. Hope this helps.
August 17, 2011 at 9:27 am
This worked.
isnull(foldername ,'') LIKE '%' + isnull(@foldername ,isnull(foldername ,'')) + '%'
Also set the parameter properties to allow blank value.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy