SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].[p_grid_nm_pol_monthly_payments_days]
	@monthly_payment_code as ais_code_short,
	@payment_day AS ais_code_short  = '%' 
AS
BEGIN
	SET NOCOUNT ON

	SELECT	*
	FROM nm_pol_monthly_payments_days
	WHERE		( nmpmpd_monthly_payment_code = @monthly_payment_code ) 
			and ( @payment_day = '%' OR convert(varchar,nmpmpd_day) = @payment_day )

END

GO
