
IF EXISTS(SELECT 1 FROM sys.views  WHERE object_id = OBJECT_ID(N'[dbo].[V_GLB_AGEND_LOJA_PRC_FILIAL_TENTACLE]'))
    DROP VIEW [dbo].[V_GLB_AGEND_LOJA_PRC_FILIAL_TENTACLE];
GO

CREATE VIEW [dbo].[V_GLB_AGEND_LOJA_PRC_FILIAL_TENTACLE]
AS
SELECT
	CD_AGEND
	,CD_EMP
	,CD_FILIAL

from GLB_AGEND_LOJA_PRC_FILIAL

WHERE GLB_AGEND_LOJA_PRC_FILIAL.CD_EMP = 1
GO

