forms builder开发的几个问题!

[复制链接]
查看11 | 回复9 | 2005-12-23 16:28:18 | 显示全部楼层 |阅读模式
1.在过程过程中不能使用如下语句:
insert into Table_B
select (select max(B_detail_id)

from Table_B
where offer_detail_id < 21010500) + rownum,
c1,
'10A',
42020300,
'2',
1,
999,
0,
0,
null
from Table_A
就是select的列使用子查询这样的语句,是这样吗?(我这样写报错)
2.如何在forms builder的过程中调用数据库当前用户的存储过程?
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
顶一下!
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
各位老大帮我看看啊!
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
1.
select (select max(B_detail_id)
from Table_B
where offer_detail_id < 21010500) + rownum,
c1,
'10A',
42020300,
'2',
1,
999,
0,
0,
null) -- 这里少一个反括号
from Table_A
2.
form builder 中直接调用就可以了
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
1.不少括号啊
2.直接写过程名吗?好像不行啊!能给出具体语法么?
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
怎么不行???你连上数据库了吗?
连上数据库后肯定可以直接调用的
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
select 语句报的什么错?/
把错误提示发上来
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
formsbuilder中代码如下:
PROCEDURE imp_offer IS
BEGIN
Forms_DDL('BEGINtest_proc; END;');

Forms_ddl('begin '||'test_proc'||'; End;');
--commit_form;
insert intoproduct_offer_restrication select (select max(restrication_seq) from product_offer_restrication)+rownum,c1,0, '10C',region_id, null, null, to_date('28-09-2006 15:04:05', 'dd-mm-yyyy hh24:mi:ss'), 1, 1, 1, null, null,region_id from product_offer_test p,region r where c1 is not null and c4 like '%全%' and r.local_net_id=912 ;



forms_ddl('commit');



end;
test_proc存储过程如下:

create or replace procedure test_proc is
begin
insert into err_msg select 1,1 from dual;
end test_proc;
但是form执行后,查询表err_msg表中没有数据!
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
图片上是insert语句上的错误!
回复

使用道具 举报

千问 | 2005-12-23 16:28:18 | 显示全部楼层
select (select max(restrication_seq) from product_offer_restrication)+rownum
将 +两边的换一下顺序试试, 换成:
select rownum + (select max(restrication_seq) from product_offer_restrication)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行