Share via

how to write a query by using some filter patterns in SQL Server?

maifs 40 Reputation points
Mar 25, 2023, 11:49 PM

what I want is to apply some filter patterns to search the data. For example. There is a large physical table in the database regarding medicines, I want to allow search even if user write lasix, lasixx, lasixxx, lasax, lasi, lisax. Data should be retrieved for the medicine lasix. How can I write these filter patterns in SQL query? And this query should be compilent with old SQL server versions like 2008 as well. I want to do it in SQL Server side instead of c# logic. Help and assistance is really appreciated.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,494 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 74,296 Reputation points
    Mar 26, 2023, 12:49 AM
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.