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 2008 Forums
 Transact-SQL (2008)
 select query to check % sign within filename

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-06-03 : 10:53:49
I want to query to check and see if there are any filenames in the database table, which has %sign.

select * from tab_repository where [filename] like '%'

Thank you very much for the helpful info

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2011-06-03 : 11:12:38
select * from tab_repository where [filename] like '%/%%' escape '/'

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

latch
Yak Posting Veteran

62 Posts

Posted - 2011-06-03 : 11:28:45
select * from tab_repository where filename like '%[%]%'

it will give all the filename with % in it.
Go to Top of Page
   

- Advertisement -