Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Search a table for a string

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-25 : 12:13:30
Hans writes "I am creating a search function and need to select from a description field where the search prase is contained in the description. I have tried to use the % as a wild card before and after the search string, but the results are inconsistant.

By including the % sign before and after the search string, all the contents of the table are returned, even if there is no relavance to the string. By adding it to the begining of the string, I always get the same results, irespective of the search string I enter. By adding it at the end of the string, I get no results at all.
Any help would be appreciated.
I am using SQL Server 2000 on an NT4 Box with SP 5.
Thanks"
   

- Advertisement -