SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_products_variables_lx]
	@variables_ids type_table_id READONLY
AS

	SET NOCOUNT ON;

	select	prdv_variable_id,
			prdv_variable_code, 
			nmpv_l1, nmpv_l2, nmpv_l3, nmpvt_l1, nmpvt_l2, nmpvt_l3
	FROM @variables_ids vi
		INNER JOIN pr_products_variables on vi.id  = prdv_variable_id
		INNER JOIN nm_products_variables on prdv_variable_code = nmpv_variable_code
		INNER JOIN nm_products_variables_types on nmpv_type_code = nmpvt_type_code
			
GO
