SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_grid_act_treaties]
	@treaty_id as varchar(15) = '%'
AS

set nocount on

declare @id int 

if @treaty_id = '%'
	set @id = 0
else
	set @id = convert(int, @treaty_id)


select	*
from	vw_act_treaties
where	(@id = 0 or act_actor_id = @id)
GO
