I have a store procedure which i have planned to use for search and get all values.
Scenario:
If the parameter passed is NULL it should
I just want to point out another way of solving this problem. The issue is that the default value for @KeyWord is NULL. If you change the default to '', then the problem goes away:
ALTER procedure [dbo].[usp_GetAllCustomerDetails]
(
@Keyword nvarchar(20) = ''
)
Any non-NULL customer name would then be like '%%'.