I had a table Product with these fields
I want to search all these fields with these criteria
Another parameter i will pass whether to use AND/OR operation
At a time we can search 6 fields with any of the search criteria and AND\OR operation
the condition in where clause will be like this
WHERE (ProductName = @ProductName) AND (Country Like @Country +%) OR (Manufacturer Likre(Ends) '%' + @Manufacturer ) AND (Length < (Greater) @Length)
So the user can input 6 conditions based on the above criteria.
Can u help to get the logic for where clause