• Got it - using some of the hints earlier in the thread:

    [font="Courier New"]ALTER PROCEDURE SR_numinput

    @SR_number VARCHAR(20),

    @customer VARCHAR(50) OUTPUT,

    @project VARCHAR(20) OUTPUT

    AS

    BEGIN

    declare @query NVARCHAR(500);

    declare @parm NVARCHAR(500);

    set @parm = N'@cust VARCHAR(50) OUTPUT,

    @proj VARCHAR(50) OUTPUT';

    set @query =

    'select @cust = NAME, @proj = PROJ_NUM FROM

    openquery(AtlasTest,

    ''Select P.NAME,P.PROJ_NUM from SXXX.S_SRV_REQ S, SXXX.S_PROJ P

    where p.row_id=s.proj_id and s.sr_num='''''+@SR_Number + ''''' '')';

    select @query;

    execute sp_executesql @query,

    @parm,

    @Cust = @customer OUTPUT,

    @Proj = @project OUTPUT;

    select @customer as oCustomer, @project as oProject;

    END[/font]

    Build up the select string with the input values included.

    Then use sp_executesql with defining the OUTPUT variables required, and map them to the procedure/trigger variables in the call.

    Kind of ugly, but there it is.