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-11-10 : 02:44:52
|
| Is there a way to search though a column that holds a number of search criterias, lets say that I have entered this information in a column...Product 1 - search field columnNew volvo Car volvo green turboProduct 2 - search field columnNew volvo Car volvo black turboI then want to search like this..Black carIf I make that search I want to retrieve one hit, and that should be "product 2" since that have both "Black" and "car" as search criteria.Can this be done? |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-11-10 : 02:57:00
|
| WHERE col LIKE '%black%car%' or col LIKE '%car%black%'MadhivananFailing to plan is Planning to fail |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-10 : 02:57:14
|
| SELECT * FROM youtable WHERE product LIKE '%Black%Car%' |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-11-10 : 02:58:56
|
quote: Originally posted by lionofdezert SELECT * FROM youtable WHERE product LIKE '%Black%Car%'
It should be in any orderSee my first replyMadhivananFailing to plan is Planning to fail |
 |
|
|
magmo
Aged Yak Warrior
558 Posts |
Posted - 2008-11-10 : 03:36:42
|
| worked great, Thanks! |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-10 : 03:47:20
|
Or use FULLTEXT? E 12°55'05.63"N 56°04'39.26" |
 |
|
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2008-11-10 : 05:03:03
|
| YOU R RIGHT MADHI... |
 |
|
|
|
|
|