• I would say something like this should work. I don't have a linked server of any kind on my system so I can't test it:

    SELECT

    dept = e.dept,

    fname = e.fname,

    lname = e.lname,

    empnum = e.empnum ,

    calls_key = oq.calls_key,

    ext = oq.ext

    FROM

    linkedserver.dbo.EMP e

    inner join OPENQUERY(PHONEDB,'SELECT calls_key, ext FROM calls') oq

    on (e.ext = oq.ext)

    WHERE

    e.ext = ext

    AND e.active = 1

    and oq.calltype IN ( 'from-internal', 'ext-local', 'ext-queues', 'ext-grou')

    Also, please note the use of the table aliases especially on the linked server. The use of 3 and 4 part names in the select list is a deprecated feature and should not be used. You should use table alaises in the from clause.