In SQL Server can you find the first number in a string?

前端 未结 5 731
孤街浪徒
孤街浪徒 2021-02-12 09:53

I have a varchar(50) sql server column with data like this:

RawData
----------------------------
Washington 40 New Orleans 32
Detroit 27 St. Louis 23
         


        
5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-12 10:38

    You can use the PATINDEX function instead of CHARINDEX, here lies the documentation ;)

提交回复
热议问题