• Something like this?

    DECLARE @OutlineNumber VARCHAR(1000)

    SET @OutlineNumber= '.I.A.1.b.'

    SELECT STUFF(SUBSTRING(@OutlineNumber,1,CHARINDEX('.',@OutlineNumber,N+1)),1,1,'')

    FROM dbo.Tally

    WHERE N < LEN(@OutlineNumber)

    AND SUBSTRING(@OutlineNumber,N,1) = '.'

    The variable needs to have a dot at the beginning and at the then for this solution to work...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]