• well this kind of gets you the data chopped up into the pieces youa r elooking for;

    i'm using the famous DelimitedSplit8K you'll find links to in many posters signitures, and you can search teh site as well:

    With MyCTE( Code,[Desc])

    AS

    (

    SELECT 'A1','AAAA BBBB CCCC' UNION ALL

    SELECT 'A1.1','AAAA BBBB CCCC DDDDD' UNION ALL

    SELECT 'A1.2','AAAA BBBB CCCC DDDDD EEEEE' UNION ALL

    SELECT 'A2','XXXX' UNION ALL

    SELECT 'A2.1','XXXX YYYY' UNION ALL

    SELECT 'A2.3','XXXX YYYY ZZZZ'

    )

    select * From MyCTE

    cross apply dbo.DelimitedSplit8K([Desc],' ') x

    i have no idea what you wanted for your final outoput; it was just not intuitive what you are after.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!