Hello all,
I have a simple report with columns ID, full Name, Salary. My report wants to show the data from 3 columns with parameter @Name. User want to enter the Name columns like first name or last name or full name(without,) to get the result as shown in below.
But when they enter name without ',' , results shown as below. In-order to get the result what is the best way to use parameter in where clause. ?
I used the 'Name' parameter from where clause with wild card options as shown in below.
SELECT * FROM dbo.test where Name like '%'+@Name+'%'
This is the simple table but I have a very large table which has 'Description' column . I have to get full name from this column and I have to use it as a parameter so that user can enter first name or last name or full name(without ,) to get the results.
Kindly provide any solution in where clause, how to use wild cards to get the results as shown in above images.
Thanks.
bihelp