how to substring of a string in SQL

前端 未结 2 1712
遥遥无期
遥遥无期 2021-01-29 10:07

My data will be like that

IPDocument/XR/test_20120409_clearGAC.txt
IPDocument/XR/test_20120409_clearGAC_05.txt
IPDocument/XR/test_20120409_clearGAC_01.txt
         


        
2条回答
  •  深忆病人
    2021-01-29 10:13

    SELECT SUBSTRING('IPDocument/XR/test_20120409_clearGAC.txt', CHARINDEX('09_','IPDocument/XR/test_20120409_clearGAC.txt')+3, 100)
    

    result : clearGAC.txt

提交回复
热议问题