• You could use a subquery or CTE to get the roles per fname (including the user_id from the user_role table) and join that back to the user table. Based on that, insert the new values.

    Please note that I decided against the option to provided the code snippet since I think you should give it a try based on the description. If you get stuck, post back your current query and what you're struggling with.



    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]