CREATE OR REPLACE procedure menu_novedades as encuesta varchar2(300); noticia varchar2(300); foro varchar2(300); temp number; begin htp.print(' '); select nvl(max(seq_encuesta),0) into temp from encuestas; if temp>0 then select pregunta into encuesta from encuestas where seq_encuesta=temp; htp.print(' '); end if; htp.print(''); select nvl(max(seq_noticias),0) into temp from noticiasw; if temp>0 then select titular into noticia from noticiasw where seq_noticias=temp; htp.print(' '); end if; htp.print('
'||chr(38)||'nbsp; NOVEDADES
'||chr(38)||'nbsp;
ENCUESTAS
'||chr(38)||'nbsp; '||encuesta||'
'||chr(38)||'nbsp;
NOTICIAS
'||chr(38)||'nbsp; '||noticia||'
'); end; /