没有得到想要的结果
Not getting the desired results
enter code here
我有一个问题。 pl/sql 之前曾经在下面工作,现在我不知道发生了什么...我想使用复选框
将记录插入从交互式报告传入的 table 中
我的 sql 是
SELECT apex_item.checkbox2(1,filenumber)
|| apex_item.hidden(2,filename)
|| APEX_ITEM.hidden(3,'&APP_USER. ')
|| APEX_ITEM.hidden(4,volume)
|| APEX_ITEM.hidden(6,filename)
as "SELECT",
FILENUMBER,
FILENAME,
LOCATION,
OPENDATE,
CLOSEDDATE,
VOLUME,
SUB,
temporary,
registryid,
STATUS
from REGISTRY
我的 pl/sql 是
begin
for idx in 1 .. apex_application.g_f01.count
loop
if apex_application.g_f01(idx) is not null then
insert into incoming
(filenumber,
filename
)
values
(apex_application.g_f01(idx),
apex_application.g_f02(idx)
);
end if;
end loop;
end;
所有这一切都发生在处理之后..这工作正常..但是从最近开始我遇到的问题是 pl/sql 给了我正确的文件号但文件名不正确。
例如
假设他们的报告有
filenumber filename
1 aaron
2 kerron
3 Joshua
当我 select 数字 2(第二条记录)传入的结果 table 将是
filenumber filename
2 aaron
一旦它落在 apex_item.hidden 中,它总是 select 处理第一条记录。
如果我将其反转并放置
SELECT apex_item.checkbox2(1,filename)
|| apex_item.hidden(2,filenumber)
文件名正确,文件号将按照我上面的解释进行操作,如果我选择第二条记录,我将得到
filenumber filename
1 kerron
当我添加
begin
for idx in 1 .. apex_application.g_f01.count loop
for i in 1..apex_application.g_f02.count loop
if apex_application.g_f01(idx) is not null then
insert into INCOMINGREQUESTNOTIFICATION
(requestedfile,filenumber
)
values
(apex_application.g_f01(idx),
apex_application.g_f02(i)
);
end if;
end loop;
end loop;
end;
@romeuBraga 我得到了所有 3 行而不是 selected 你能告诉我哪里做错了吗
您需要隐藏物品来存储ID。
*1和2存储相同的信息
select column1,
column2,
column3,
apex_item.hidden(p_idx => 1,
p_value => code) ||
apex_item.checkbox2(p_idx => 2,
p_value => code) CheckBox,
other items
from x
在这种情况下,您需要此 pl/sql 来获取正确的行值。
begin
for i in 1..apex_application.g_f01.count loop
for j in 1..apex_application.g_f02.count loop
if apex_application.g_f01(i) = apex_application.g_f02(j) then
--insert something here
end if;
end loop;
end loop;
end;
enter code here
我有一个问题。 pl/sql 之前曾经在下面工作,现在我不知道发生了什么...我想使用复选框
我的 sql 是
SELECT apex_item.checkbox2(1,filenumber)
|| apex_item.hidden(2,filename)
|| APEX_ITEM.hidden(3,'&APP_USER. ')
|| APEX_ITEM.hidden(4,volume)
|| APEX_ITEM.hidden(6,filename)
as "SELECT",
FILENUMBER,
FILENAME,
LOCATION,
OPENDATE,
CLOSEDDATE,
VOLUME,
SUB,
temporary,
registryid,
STATUS
from REGISTRY
我的 pl/sql 是
begin
for idx in 1 .. apex_application.g_f01.count
loop
if apex_application.g_f01(idx) is not null then
insert into incoming
(filenumber,
filename
)
values
(apex_application.g_f01(idx),
apex_application.g_f02(idx)
);
end if;
end loop;
end;
所有这一切都发生在处理之后..这工作正常..但是从最近开始我遇到的问题是 pl/sql 给了我正确的文件号但文件名不正确。 例如 假设他们的报告有
filenumber filename
1 aaron
2 kerron
3 Joshua
当我 select 数字 2(第二条记录)传入的结果 table 将是
filenumber filename
2 aaron
一旦它落在 apex_item.hidden 中,它总是 select 处理第一条记录。
如果我将其反转并放置
SELECT apex_item.checkbox2(1,filename)
|| apex_item.hidden(2,filenumber)
文件名正确,文件号将按照我上面的解释进行操作,如果我选择第二条记录,我将得到
filenumber filename
1 kerron
当我添加
begin
for idx in 1 .. apex_application.g_f01.count loop
for i in 1..apex_application.g_f02.count loop
if apex_application.g_f01(idx) is not null then
insert into INCOMINGREQUESTNOTIFICATION
(requestedfile,filenumber
)
values
(apex_application.g_f01(idx),
apex_application.g_f02(i)
);
end if;
end loop;
end loop;
end;
@romeuBraga 我得到了所有 3 行而不是 selected 你能告诉我哪里做错了吗
您需要隐藏物品来存储ID。 *1和2存储相同的信息
select column1,
column2,
column3,
apex_item.hidden(p_idx => 1,
p_value => code) ||
apex_item.checkbox2(p_idx => 2,
p_value => code) CheckBox,
other items
from x
在这种情况下,您需要此 pl/sql 来获取正确的行值。
begin
for i in 1..apex_application.g_f01.count loop
for j in 1..apex_application.g_f02.count loop
if apex_application.g_f01(i) = apex_application.g_f02(j) then
--insert something here
end if;
end loop;
end loop;
end;