• My guess is that one of the columns bd.SORTUSER_EMPID or ed.[Employee ID] is numeric and the otherone is a varchar and contains a non-numeric value. This error would be caused by an implicit conversion. To avoid it, cast the numeric column as varchar and consider changing the data types from your columns to the adequate data types.

    EDIT: Lowell had the same guess than me and posted faster than me 😀

    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