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 |
|
ms65g
Constraint Violating Yak Guru
497 Posts |
Posted - 2009-10-26 : 11:35:37
|
Hi,I want to select rows when 'a' and 'b' and 'c' letters be in the column data string (order and arrangement is not important)For example:'cccacb' is true'abc' is true'cba' is true'fabe' is falseJust by one logical expression. I am not looking for this method:Where Column_Name LIKE '%[a]%' AND Column_Name LIKE '%[b]%'AND Column_Name LIKE '%[c]%' |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-10-26 : 11:49:01
|
| Why aren't you looking for that method? Do you have an assignment to use CHARINDEX or some thing else in particular?JimEveryday I learn something that somebody else already knew |
 |
|
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2009-10-26 : 11:52:31
|
| your solution is pattern matching LIKE '[a-cdf]'you will have to twek it to your need<><><><><><><><><><><><><><><><><><><><><><><><><>If you don't have the passion to help people, you have no passion |
 |
|
|
|
|
|