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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 identify _

Author  Topic 

arkiboys
Master Smack Fu Yak Hacker

1433 Posts

Posted - 2007-05-10 : 10:14:35
Can you please let me know why this sql query does not return the values whcih have an underscore i.e. '_' in it?
Is there an alternative to _ in sql?

select [Name] from tblIndices where patindex('%_%', [Name]) > 0

Thanks

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2007-05-10 : 10:17:27
select [Name] from tblIndices where patindex('%[_]%', [Name]) > 0

Chirag

http://chirikworld.blogspot.com/
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2007-05-10 : 10:22:36
wild characters should be specified in square braces

Madhivanan

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

- Advertisement -