• The problem is that you're using old outer join syntax. You just need to change it as it's no longer supported.

    SELECT a.assignee,

    sort = isnull(b.last_asgmnt, '0000-00-00.00:00:00') + a.assignee,

    email,

    phone,

    pager

    FROM assignee a

    LEFT JOIN VW_LAST_ASGNMNT b ON a.assignee = b.assignee

    WHERE a.assignee LIKE '$AUTO%' --As long as your collation is case insensitive.

    AND a.available LIKE 'Y%'

    AND groupname = @groupname

    ORDER BY sort

    Additional to this problem, I feel the need to advice you that this trigger will fail (silently) with multiple rows operations and will create some performance problems. I don't have enough information to indicate a better option and I'm sure this isn't the only problem that you'll have.

    EDIT: I changed the code to remove the functions in your WHERE clause to allow them to use indexes if available.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2