create table tmp.odb_avm_promedweb206788 as (
            select d.EvnDirection_id, d.pmUser_signID, d.EvnDirection_signDT, r.EMDRegistry_id, r.EMDDocumentTypeLocal_id
            from dbo.v_EvnDirection_all d
                left join tmp._emdregistry_ r on r.EMDRegistry_ObjectID = d.EvnDirection_id and r.EMDRegistry_ObjectName = 'EvnDirection' and r.EMDDocumentTypeLocal_id = 11
            where d.DirType_id = 11 and d.EvnDirection_insDT >= '2024-01-01T00:00:00' and d.EvnDirection_IsSigned = 2
        );
