declare
l_str varchar2(2000);
begin
for i in (select q.title,
case substr(q.url,0,4)
when 'http' then
q.url
else 'https://'||q.url
end as url
from QUICK_LINKS q
WHERE q.role = 'S'
order by q.order_num
) loop
htp.print('
'||i.title||'');
end loop;
end;