<1>create:
ALTER proc [dbo].[common_proc]
@sql1 varchar(5000),
@sql2 varchar(5000) OUTPUT
as begin
set @sql2=@sql1+'';
end;
<2>call:
exec [dbo].[common_proc] @sql , @midsql OUTPUT
set @sql = (select @midsql)