IF EXISTS (SELECT * FROM SYS.VIEWS WHERE NAME = 'V_PBM_CREDENCIAL_TENTACLE')

BEGIN
	DROP VIEW V_PBM_CREDENCIAL_TENTACLE
END

GO

CREATE VIEW [dbo].[V_PBM_CREDENCIAL_TENTACLE]
AS
SELECT 
    CD_EMP,
    CD_FILIAL, 
    CD_TP_PBM, 
    USUARIO, 
    SENHA, 
    URL, 
    AMBIENTE,
    ATIVAR_AUTENTICACAO, 
    CODIGO_LOJA,
    USUARIO_FTP, 
    SENHA_FTP, 
    PASTA_FTP,
    PORTA_FTP, 
    ENDERECO_FTP,
	CLIENT_ID
FROM 
    PBM_CREDENCIAL
WHERE 
    ATIVAR_AUTENTICACAO = 1;
GO


