• I guess I need a definition of a 'user' and a definition for a 'customer' for you are asking us to understand the business logic to see if your query is correct.

    If you need a user name without the domain portion a little string manipulation is all that's called for >

    I just quickly came up with

    select right(system_user,len(system_user)-charindex('\',system_user,1) )

    If this piece doesn't help at least I hope it gives you an idea.

    ----------------------------------------------------