IF any of you can give me a definitive answer on this, you are my hero for the day:
SQL LIKE QUERY using a parameter:
The goal is I have a table in my database (SQL Server 9.0.5) of a list of names (Dan, Mike, Darma, Mark, Sherry, etc...). I wrote a VB program that access the table and sorts a list in a datagrid and I want to be able to filter the list using a parameter
such as this, If I type in "AR" it will return "DARMA" and "MARK"
So....
In my Query, I know that @PARAM1 is used for the parameter and that the '%' is used for any nchar...
so... LIKE '%' + @PARAM1 + '%'
didn't work, so I attempted ... LIKE '%' & @param1 & '%' .... which failed as well
I tried many more variations (including removing the LIKE and using just '%@PARAM1%')
so i search the internet, and I've come to the conclu ...
Go to the complete details ...