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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-03-21 : 08:13:25
|
| CHALASANI writes "I have a name in my table which is "ra_ja" I want to find the name with the help of the'_' character.Can you please help with the querrySorry with my englishThank you" |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-03-21 : 08:21:27
|
Something like:select * from table where charindex('_',fieldname) > 0 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-03-21 : 08:27:08
|
| where col like '%_%'MadhivananFailing to plan is Planning to fail |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-03-21 : 08:28:44
|
quote: Originally posted by madhivanan where col like '%_%'MadhivananFailing to plan is Planning to fail
Doesn't work as _ is a wildcard for any char.. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-03-21 : 08:40:33
|
Yes. Actually I wanted to mean where col like '%[_]%' MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|