• There's the strategy of building the string to pass through. If there's a better way I'd sure love to know. Counting tick marks gets old.

    DECLARE @UIDchar(9),

    @Queryvarchar(5000)

    Set @UID = '123456789'

    Set @Query = 'SELECT *

    FROM OPENQUERY(LINKED_SERVER,''SELECT *

    FROM TABLE_NAME

    WHERE UID = ''''' + @EID + ''''''')'

    exec(@Query)



    Everett Wilson
    ewilson10@yahoo.com