sql server - PatIndex match regex -


i've been struggling find regex using patindex match , including first dot. example dbo. in dbo.table. help?

the best had select patindex('%_.%', 'dbo.table') leaves dot.

upto knoweldge, there no need use _ in pattern, patindex returns index of first matching word or character.

try this:

select patindex('%.%', 'dbo.table') -- output: 4 select patindex('%.%', 'servername.dbo.table') -- output: 11 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -