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.
| Author |
Topic |
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-01-18 : 07:17:03
|
| HiIf I have one search box in a webform and enter ford + volvo, can I then do a search in sql server for both ford and volvo in a database table. Is there some built in support for that kind of search? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-18 : 07:40:15
|
| where '+'+@search_value+'+' like '%+'+col+'+%'MadhivananFailing to plan is Planning to fail |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-01-18 : 08:28:17
|
HiHmm, this combination should have retrieved rows...SELECT Symptome, Faq_IDFROM dbo.tbl_FaqWHERE ('+' + 'After + above' + '+' LIKE '%+' + Symptome + '+%')On this symptome text...After a time of use on above carOr am I doing something wrong? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-18 : 08:37:39
|
Did symptome column has values like after,above,etc?declare @t table(symptome varchar(100))declare @search varchar(100)set @search='after+above'insert @t select 'above' union all select 'after' union all select 'all'select * from @twhere ('+' + ''''+replace(@search,'+','''+''')+'''' + '+' LIKE '%+''' + Symptome + '''+%')MadhivananFailing to plan is Planning to fail |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-01-18 : 09:43:14
|
| Yes the symptom column ghad this value..."After a time of use on above car" |
 |
|
|
|
|
|