SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE procedure [dbo].[p_int_retrocessions]
	@table_code_short type_table_code_short READONLY
	
as

select i.*, ntr.* 
from int_retrocessions i
	inner join @table_code_short t ON i.iret_retro_code = t.code_short
	INNER JOIN nm_types_retro ntr ON i.iret_type_retro_code = ntr.nmtr_type_retro_code

select i.* 
from int_retrocessions_years i
	inner join @table_code_short t ON i.irety_retro_code = t.code_short

GO
