Bez popisu

sql_20180111_P_GetIVRWelcomes.sql 801B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /****** Object: StoredProcedure [dbo].[P_GetIVRWelcomes] Script Date: 01/02/2018 16:09:35 ******/
  2. IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[P_GetIVRWelcomes]') AND type in (N'P', N'PC'))
  3. DROP PROCEDURE [dbo].[P_GetIVRWelcomes]
  4. GO
  5. /****** Object: StoredProcedure [dbo].[P_GetIVRWelcomes] Script Date: 01/02/2018 16:09:35 ******/
  6. SET ANSI_NULLS ON
  7. GO
  8. SET QUOTED_IDENTIFIER ON
  9. GO
  10. CREATE PROCEDURE [dbo].[P_GetIVRWelcomes]
  11. AS
  12. BEGIN
  13. SET NOCOUNT ON;
  14. declare @words varchar(50);
  15. declare @isw int=0;
  16. select top 1 @words=F_Content from [12345].[dbo].[T_Sys_IVRWords] where isnull(F_IsState,0)=1 and (F_StartDate<=getdate() and F_EndDate>=getdate())
  17. if ISNULL(@words,'')!=''
  18. begin
  19. set @isw=1
  20. end
  21. select @isw as isw,@words as words
  22. END
  23. GO