
IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_RC_DEB_CLI_TENTACLE'
)

DROP VIEW [dbo].[V_RC_DEB_CLI_TENTACLE]
GO

CREATE VIEW [dbo].[V_RC_DEB_CLI_TENTACLE]
AS
     SELECT CD_EMP,
            CD_CLI,
            cast(CAST(FAT_XML AS varchar(max)) as varbinary(max)) AS FAT_XML,
		    --FAT_XML,
            GETDATE() AS DT_HR_CARGA
     FROM RC_DEB_CLI_PDV
     WHERE CD_EMP = 1;

GO


