my code stock.com

V_HST_SUBSCR_SRV_FSC_WEEK

Snippet options

Download: Download snippet as v_hst_subscr_srv_fsc_week.sql.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

ALTER VIEW [dbo].[V_HST_SUBSCR_SRV_FSC_WEEK]
AS
SELECT     COD_SUBSCR_SRV, 
		   COD_PROD_SRV_TY, 
		   COD_SRV_PLAN, 
		   COD_SRV_FAM, 
		   COD_PROD_SRV, 
		   COD_EQUIP, 
		   COD_VEND, 
		   COD_SUBSCR, 
		   OPR_COD_SRV, 
           DAT_INI_DW			AS DAT_INI_DW_SRV, 
           DAT_END_DW			AS DAT_END_DW_SRV, 
           DAT_INI_BILL, 
           DAT_END_BILL, 
           DAT_INSTALL			AS DAT_INSTALL_SRV, 
           DAT_CANCEL			AS DAT_CANCEL_SRV, 
           IND_TLINK, 
           IND_DLINK, 
           IND_KIT, 
           QTT_SRV				AS QTT_SRV_ACTV, 
           COD_USER_CREATED, 
           DAT_USER_CREATED, 
           COD_USER_MODF, 
           DAT_USER_MODF, 
           VAL_SRV,
           B.COD_FSC_WEEK
           
FROM         DBO.SN_T_HST_SUBSCR_SRV A,
			 DBO.SN_T_LKP_FSC_WEEK B
WHERE     (DAT_PFL_END = 20991231)
AND		  A.DAT_INI_BILL <= B.COD_LAST_DAY_FSC_WEEK
AND		  A.DAT_INI_DW <= B.COD_CLOSE_DAY_FSC_WEEK
AND		  (A.DAT_END_DW < 0) OR (A.DAT_END_DW > B.COD_CLOSE_DAY_FSC_WEEK) OR ( (A.DAT_END_DW <= B.COD_CLOSE_DAY_FSC_WEEK) AND (A.DAT_END_BILL > B.COD_LAST_DAY_FSC_WEEK) )

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.