-- Insertar datos en la nueva tabla
IF (EXISTS (SELECT *
            FROM INFORMATION_SCHEMA.TABLES
            WHERE TABLE_SCHEMA = 'vsegbas'
              AND  TABLE_NAME = 'GestoresDeCuenta'))
    BEGIN
        SET IDENTITY_INSERT asurnet.dbo.GestoresDeCuenta ON;
        INSERT INTO asurnet.dbo.GestoresDeCuenta
        (GCU_Id, GCU_Nombre)
        SELECT GCU_Id, GCU_Nombre
        FROM vsegbas.dbo.GestoresDeCuenta
        WHERE (SELECT Count(*)
               FROM information_schema.tables
               WHERE table_schema = 'vsegbas'
                 AND table_name = 'GestoresDeCuenta') = 1
        SET IDENTITY_INSERT asurnet.dbo.GestoresDeCuenta OFF;
    END
