SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_products_list_by_branch]
	@branch_id INT
AS
	SET nocount ON;

	SELECT pp.*
	FROM pr_products pp
		INNER JOIN pr_products_branches ppb ON		pp.prd_product_code = ppb.prdb_product_code
												AND ppb.prdb_branch_id = @branch_id
												AND ppb.prdb_freeze = 0
	WHERE pp.prd_freeze = 0
GO
