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
 General SQL Server Forums
 New to SQL Server Programming
 To find the special character inside a name

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 querry

Sorry with my english
Thank 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
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-21 : 08:27:08
where col like '%_%'

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2006-03-21 : 08:28:44
quote:
Originally posted by madhivanan

where col like '%_%'

Madhivanan

Failing to plan is Planning to fail


Doesn't work as _ is a wildcard for any char..
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-03-21 : 08:40:33
Yes. Actually I wanted to mean where col like '%[_]%'


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -