• Perhaps this will help you find the path?

    ;WITH Transcript (message) AS (

    SELECT '20:32:12 [Rachel] Thank you for contacting Our Company. How may I assist you?'

    UNION ALL SELECT '20:32:31 [Marina Galofaro] What is the mailing address to mail a check?'

    UNION ALL SELECT '20:32:49 [Rachel] I''m happy to provide you with the mailing address.'

    UNION ALL SELECT '20:33:22 [Marina Galofaro] O kay, Thank you.'

    UNION ALL SELECT '20:33:28 [Rachel] One moment please while I provide a link with directions to mail your payment.'

    UNION ALL SELECT '20:34:05 [Rachel] Please click <a href="http://company.custhelp.com/app/answers/detail/a_id/1050/kw/payment" target="_blank">here</a> to view how to mail a payment.'

    UNION ALL SELECT '20:35:07 [Rachel] Is there anything else I can help with, Marina? '

    UNION ALL SELECT '20:35:56 [Marina Galofaro] No, Thank you!'

    UNION ALL SELECT '20:36:00 [Marina Galofaro] Session Disconnected'),

    Operators (username) AS (

    SELECT 'Rachel')

    SELECT message, username

    ,operator=LEFT(operator, CHARINDEX(']', operator)-1)

    ,CHARINDEX(']', operator)

    ,TextOfMessage=LTRIM(RIGHT(operator, LEN(operator)-CHARINDEX(']', operator)))

    FROM Transcript

    CROSS APPLY (

    SELECT SUBSTRING(message, CHARINDEX('[', message)+1, LEN(message))

    ) a(operator)

    LEFT JOIN Operators ON LEFT(operator, CHARINDEX(']', operator)-1)=username

    WHERE username IS NULL


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St