I am getting the same error as well.
Here are the code for the same.
I would like to convert one procedure to function and call that function into...
set statistics time on
set statistics io on
select distinct a.keyinstn, e.keyperson
from snl_new..instn a
inner join lookup..industry d on...
Separate names with a comma.