• Use the following script -

    DECLARE @StringVARCHAR(255),

    @SearchStrVARCHAR(255)

    SET @String='The quick brown fox jumps over the lazy dog'

    SET @SearchStr='fox '+'////'

    SELECT SUBSTRING(@String,CHARINDEX(LEFT(@SearchStr,LEN(@SearchStr)-4),@String),LEN(@SearchStr)-4)

    Note: You can directly have the column name in place of the variable.

    Chandrachurh Ghosh
    DBA – MS SQL Server
    Ericsson India Global Services Limited
    Quality is not an act, it is a habit.