Capture 20th occurrence in SQL Server

  Kiến thức lập trình

Anyone can help me to translate this statement from Oracle to SQL Server? The string I am looking for is T-M123-123456 – its 20th occurrence, basically the identical occurrence is T-M.

Here’s the statement in Oracle:

REGEXP_SUBSTR(FILE_CONTENT, '^T-[A-Z][0-9].*', 1, 20, 'm')

1

LEAVE A COMMENT