我对经典报告有疑问,它是基于多个表连接的。在其上,我已经编写了循环和仅插入复选框项的过程。但它只选择第一项。但是,如果在单个表上执行此操作,它将正常工作。当查询基于多个连接时,如果有人能帮助我插入选定的记录,我将不胜感激。
我的问题如下。
select apex_item.checkbox2(1, ord.rowid) sel,
apex_item.text(2,cust.name) Customer,
apex_item.text(3, it.item_id) Item,
apex_item.text(4,it.product_id) Product,
apex_item.text(5,price) price,
apex_item.text(6,quantity)||apex_item.hidden(7,ord.id) qty
from s_ord ord,
s_item it,
s_customer cust
where ord.id=it.ord_id
and cust.id=ord.customer_id我的流程如下;
for i in 1..apex_application.g_f01.count loop
APEX_DEBUG_MESSAGE.LOG_MESSAGE(p_message => 'G_F01 : '||APEX_APPLICATION.G_F01(i), p_level => 1);
APEX_DEBUG_MESSAGE.LOG_MESSAGE(p_message => ' Q1 : '||APEX_APPLICATION.G_F02(i), p_level => 1);
APEX_DEBUG_MESSAGE.LOG_MESSAGE(p_message => ' P1 : '||APEX_APPLICATION.G_F03(i), p_level => 1);
end loop;
end;发布于 2018-04-29 03:05:54
据我所知,如果表格表单被创建为两个(或更多)表的JOIN (没有调查原因),就不能这样做。
下面是我要做的:
从其他表(使用JOINs)获取的
这就解决了这个问题。
例如:您希望更新员工的信息,但也要显示他们所在的部门名称。
不要:
select e.empno,
e.ename,
d.dname,
e.sal
from emp e join dept d on e.deptno = d.deptno;执行以下操作:
create function f_dname (par_deptno in dept.deptno%type)
return dept.dname%type
is
retval dept.dname%type;
begin
select max(d.dname)
into retval
from dept d
where d.deptno = par_deptno;
return retval;
end;
/
select e.empno,
e.ename,
f_dname (e.deptno) dname, --> function instead of DEPT.DNAME
e.sal
from emp e; --> no join我希望它能帮上忙。
https://stackoverflow.com/questions/50069904
复制相似问题