我在SQL ORACLE数据库上工作,我创建了一个表,然后进入foor loob,并使用htf将表转换为html格式。
create table show_mail (id number, data varchar2(25));
insert into show_mail values(101, 'one hundred & one')
insert into show_mail values(202, 'two hundred & two')
insert into show_mail values(303, 'three hundred & three')
DECLARE
v_html VARCHAR2(32767);
BEGIN
v_html := v_html || HTF.TABLEOPEN('border="1px"');
v_html := v_html || HTF.TABLEROWOPEN;
v_html := v_html || HTF.TABLEHEADER('ID.DATA');
v_html := v_html || HTF.TABLEROWCLOSE;
FOR i IN (SELECT * FROM show_mail) LOOP
v_html := v_html || HTF.TABLEROWOPEN;
v_html := v_html || HTF.TABLEDATA((i.id));
v_html := v_html || HTF.TABLEDATA(HTF.ESCAPE_SC(i.data));
v_html := v_html || HTF.TABLEROWCLOSE;
END LOOP;
v_html := v_html || HTF.TABLECLOSE;
DBMS_OUTPUT.PUT_LINE(v_html);
end; 我写了这段代码,结果是这样的;
ID.DATA
101 numberone
202 numbertwo
303 numberthree然而我想看到的是喜欢;
ID.DATA
101.numberone
202.numbertwo
303.numberthree有没有可能数字指向和书写在一起?
发布于 2018-07-23 16:24:07
只需连接这些值并将其写入HTF.TABLEDATA(i.id||'.'||i.data);即可
https://stackoverflow.com/questions/51473188
复制相似问题