IF NOT EXISTS (
    SELECT 1 
    FROM sys.objects 
    WHERE object_id = OBJECT_ID('dbo.EST_NFE_INF_EFET_PGTO_INTEG_VALIDADA') 
      AND type = 'U'
)
BEGIN
    CREATE TABLE dbo.EST_NFE_INF_EFET_PGTO_INTEG_VALIDADA (
        CD_CTR_INF_EFET_PGTO_INTEG INT NOT NULL,
        NR_AUTORIZADOR VARCHAR(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        NR_PROTOCOLO VARCHAR(50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        VS_PROTOCOLO VARCHAR(10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        VS_APLIC VARCHAR(30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        DG_VALIDADOR VARCHAR(60) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
        TP_AMB INT NOT NULL,
        STS_IMP INT NOT NULL,
        DT_RECBTO DATETIME NULL,
        DS_RESULTADO VARCHAR(MAX) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
        CONSTRAINT PK_EST_NFE_INF_EFET_PGTO_INTEG_VALIDADA PRIMARY KEY (CD_CTR_INF_EFET_PGTO_INTEG)
    );
END;
GO
