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
Post a Comment