CREATE OR REPLACE PROCEDURE usuarios_avisos_emt_checkbox (destinatario VARCHAR2) AS controlexis number; usuarioinfo varchar2(250); nombrew varchar2(250); cont NUMBER; temp NUMBER; total NUMBER; CONTADOR NUMBER; CURSOR c1 IS SELECT user_name FROM WWSEC_PERSON$ WHERE user_name NOT IN ('PORTAL','PORTAL_ADMIN','PUBLIC','ORCLADMIN'); BEGIN SELECT COUNT(*) INTO total FROM WWSEC_PERSON$ WHERE user_name NOT IN ('PORTAL','PORTAL_ADMIN','PUBLIC','ORCLADMIN'); cont:=1; CONTADOR:=1; htp.print('
Seleccione los usuarios a los cuales
desea enviar un mensaje

'); FOR reg IN c1 LOOP select nvl(count(*),0) into controlexis from info_portal_empleados where to_char(num_ident)=reg.user_name; if controlexis=1 then select num_ident||' '||NOMBRE||' '||Apellido_1||' '||Apellido_2 into nombrew from info_portal_empleados where to_char(num_ident)=reg.user_name; htp.print(''||nombrew||'
'); cont:=cont+1; end if; END LOOP; htp.print('
'); END; /