CREATE OR REPLACE PROCEDURE muestra_opinion AS CURSOR c1 IS SELECT seq_comentario,comentario,fecha,usuario from comentarios where val in('S','s') order by fecha desc; temp NUMBER; cont NUMBER; usu varchar2(100); aux VARCHAR2(1); col NUMBER(1); fondocol varchar2(7); raizwww varchar2(30); BEGIN raizwww:='webserver.emtsam.net'; col :=1; htp.print(' '); SELECT nvl(COUNT(*),0) INTO cont FROM comentarios where val = 'S' or val = 's'; IF cont > 0 THEN htp.print(' '); FOR reg IN c1 LOOP if reg.usuario = 'PORTAL_PUBLIC' then usu:='PORTAL'; else select nombre||' '||apellido_1||' '||apellido_2 into usu from info_portal_empleados where num_ident = to_number(reg.usuario); end if; if col = 1 then fondocol:='#F2F2F2'; col:=2; else fondocol:='#D6EFF0'; col:=1; end if; htp.print(' '); END LOOP; htp.print('
La Opinion de....
'||chr(38)||'nbsp;'||usu||'
'); ELSE htp.print('
No hay Opinones Actualmente.
'); END IF; htp.print(' '); END; /