T-SQL Find char string and take all char to right of expression

前端 未结 3 1056
野性不改
野性不改 2021-01-19 10:56

How do I

Take:

RJI#\\\\\\\\Cjserver\\TrialWorks\\CaseFiles\\10000269\\Pleadings\\RJI - 10005781.doc

Find Constant expression \'\\\\Cjse

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-19 11:45

    DECLARE @String VARCHAR(100)
    SET @String = 'RJI#\\Cjserver\TrialWorks\CaseFiles\10000269\Pleadings\RJI - 10005781.doc'
    
    SELECT RIGHT(@String,LEN(@String)-PATINDEX('%\\Cjserver\%',@String)+1)
    

提交回复
热议问题