Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
APEX ORACLE-将多个参数插入从APEX到数据库表的多列中_Oracle_Plsql_Oracle Apex_Apex_Plsqldeveloper - Fatal编程技术网

APEX ORACLE-将多个参数插入从APEX到数据库表的多列中

APEX ORACLE-将多个参数插入从APEX到数据库表的多列中,oracle,plsql,oracle-apex,apex,plsqldeveloper,Oracle,Plsql,Oracle Apex,Apex,Plsqldeveloper,-APEX应用程序的结构: if the p14_check = 1 (true) will execute the package else p14_check = 0(false) will return an error message, for example dbms_output.put_line("there is an error in the ID created/generated")** Apex Oracle>页面>表单>内容正文> 项目>p14_

-APEX应用程序的结构:

if the p14_check = 1 (true) will execute the package
else p14_check = 0(false) will return an error message, for example 
dbms_output.put_line("there is an error in the ID created/generated")**
Apex Oracle>页面>表单>内容正文> 项目>p14_姓氏、p14_姓名、p14_出生日期、p14_性别、p14_城市、p14_支票

  • pkg_cf.cod_fiscale是一个pl/sql过程

  • pkg_cf=包装名称

  • cod_fiscale=程序名称

  • V_STR_C to V_comune=是函数和插入参数

  • V_controllo=将所有参数和 根据插入的参数生成/创建ID

  • employee_list=表的名称

  • 员工列表列=姓氏、姓名、出生日期、性别、城市、ID(在 在此列中,自动生成/创建的ID将放入 本栏)

**我试图在Apex操作中执行什么-执行服务器端代码:

if the p14_check = 1 (true) will execute the package
else p14_check = 0(false) will return an error message, for example 
dbms_output.put_line("there is an error in the ID created/generated")**
apex页面的结构:

区域按钮>创建>动态操作>单击创建(动态操作的名称)>TRUE>PL/SQL代码:

begin
 pkg_cf.cod_fiscale ( V_STR_C    => :P14_surname,
                      V_STR_N    => :P14_name,
                      V_DATA     => :P14_birth_date,
                      V_SESSO    => :P14_gender,
                      V_COMUNE   => :P14_city,
                      v_controllo => :P14_check);   
if P14_CHECK = 1 then insert into employee_list(name of the table) set surname = :P14_surname,
                                            set name = :P14_name,
                                            set birth_date = :P14_birth_date,
                                            set gender = :P14_gender,
                                            set city = :P14_city
else P14_CHECK = 0 then dbms.output.put_line ("there is an error in the ID created/generated");   
我编写的代码给了我一个错误: ORA-00926:缺少值关键字


:设置姓氏=:P14_姓氏,

您不使用内置表单区域功能的原因是什么?这比创建自己的包要简单得多。它还有很多需要手工编码的特性,比如丢失更新检测。看起来你想重新发明轮子

您看到的错误是因为insert语句的语法不正确。这是您的代码:

...
if P14_CHECK = 1 then insert into employee_list(name of the table) set surname = :P14_surname,
                                            set name = :P14_name,
                                            set birth_date = :P14_birth_date,
                                            set gender = :P14_gender,
                                            set city = :P14_city
但是insert语句的语法是

  INSERT INTO employee_list (surname, name, birth_date, gender, city) VALUES
    (:P14_surname,:P14_name,:P14_birth_date,:P14_gender,:P14_city);
非方面:如果在客户端工具(如sqlcl、sqlplus或sqldeveloper,或apex中的workshop)中运行pl/sql,则仅在pl/sql中使用
dbms\u输出。在应用程序中,输出无法使用,可能导致意外的缓冲区溢出错误