Using PATINDEX to find varying length patterns in T-SQL

后端 未结 6 2126
旧时难觅i
旧时难觅i 2020-12-19 01:20

I\'m looking to pull floats out of some varchars, using PATINDEX() to spot them. I know in each varchar string, I\'m only interested in the first float that exists, but they

6条回答
  •  甜味超标
    2020-12-19 02:05

    PATINDEX is not powerful enough to do that. You should use regular expressions.

    SQL Server has Regular expression support since SQL Server 2005.

提交回复
热议问题