Example : I've table with Name,Contact,City
Then from UI I get Multiple Cities list
Select * from Person where City = 'Frankfort','Texas','Washington'
I need the Condition like above.
Note: I've total search Parameters 57 For all 57 Columns I need multiple search.
This is how I written the condition Do we have any better Approach to Do It.
((@CityIS NULL) OR (';' + @City+ ';' like '%;' + City+ ';%'))
1条答案
按热度按时间bjp0bcyl1#
If you want to search 57 values in one column (city) .This code is correct
You can use table-valued parameter to solve the problem
you must create a table-valued parameter and Create PROCEDURE
You can create insert Base data with the following statements: