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 2005 Forums
 Transact-SQL (2005)
 SELECT statement and LIKE

Author  Topic 

kieran5405
Yak Posting Veteran

96 Posts

Posted - 2008-09-05 : 05:02:21
Hi,

I am looking for any recommendations if possible...

I set up a user so that they could search a nvarchar(max) column...i used
- select * from table1 where column1 like '% userWord %'

This worked fine...but now the user wants to search the column for more than 1 word to restrict results returned i.e. 'james, horse'.

Is there any better way to write the SELECT statement.

Thanks for any help...



afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-05 : 06:33:47
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=110069
Go to Top of Page

kieran5405
Yak Posting Veteran

96 Posts

Posted - 2008-09-05 : 07:55:18

cheers that put me on the right track!!!
Go to Top of Page

afrika
Master Smack Fu Yak Hacker

2706 Posts

Posted - 2008-09-05 : 12:52:28
Glad to help
Go to Top of Page
   

- Advertisement -