SELECT b.oid,gwanombre,gwadescri,gwaruta,empimagen,0 FROM DGEMPRES01..GENWIDACCE as a,dgempres01..genrol as b where a.oid=191 and b.oid=83
--- Censo Urgencias
insert into dgempres01..GENWIDACCE SELECT b.oid,gwanombre,gwadescri,gwaruta,empimagen,0 FROM DGEMPRES01..GENWIDACCE as a,dgempres01..genrol as b where a.oid=252 and b.oid in (90,124,132,69)
insert into dgempres01..GENWIDACCE
SELECT b.oid,gwanombre,gwadescri,gwaruta,empimagen,0 FROM DGEMPRES01..GENWIDACCE as a,dgempres01..genrol as b where a.oid=157 and b.oid in (2,18,83,84,85)
--- Seguimiento Agendamiento ---
insert into dgempres01..GENWIDACCE SELECT b.oid,gwanombre,gwadescri,gwaruta,empimagen,0 FROM DGEMPRES01..GENWIDACCE as a,dgempres01..genrol as b where a.oid=258 and b.oid in (4,2,18,83,84,67)
select * from dgempres01..genwidacce where genrol=1
select * from dgempres01..genusuario where usunombre='52022936'