| Line | |
|---|
| 1 | /****** Object: StoredProcedure [dbo].[sp_IsProvisionBlocked] Script Date: 06/03/2009 15:48:21 ******/
|
|---|
| 2 | SET ANSI_NULLS ON
|
|---|
| 3 | GO
|
|---|
| 4 | SET QUOTED_IDENTIFIER ON
|
|---|
| 5 | GO
|
|---|
| 6 |
|
|---|
| 7 | -- =============================================
|
|---|
| 8 | -- Author: <Author,,Name>
|
|---|
| 9 | -- Create date: <Create Date,,>
|
|---|
| 10 | -- Description: <Description,,>
|
|---|
| 11 | -- =============================================
|
|---|
| 12 | CREATE PROCEDURE [dbo].[sp_IsProvisionBlocked]
|
|---|
| 13 | @agencyId int,
|
|---|
| 14 | @year int,
|
|---|
| 15 | @month int
|
|---|
| 16 | AS
|
|---|
| 17 | BEGIN
|
|---|
| 18 | -- SET NOCOUNT ON added to prevent extra result sets from
|
|---|
| 19 | -- interfering with SELECT statements.
|
|---|
| 20 | SET NOCOUNT ON;
|
|---|
| 21 |
|
|---|
| 22 | IF EXISTS(SELECT * FROM dbo.ProvisionSettings WHERE agencyId=@agencyId AND [year]=@year AND [Month]=@month)
|
|---|
| 23 | SELECT IsBlocked FROM dbo.ProvisionSettings WHERE agencyId=@agencyId AND [year]=@year AND [Month]=@month
|
|---|
| 24 | ELSE
|
|---|
| 25 | SELECT 0
|
|---|
| 26 |
|
|---|
| 27 | RETURN
|
|---|
| 28 |
|
|---|
| 29 | END |
|---|
Notatka: Zobacz
TracBrowser
aby uzyskać więcej informacji.