Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Database \ Oracle PLS-00231 error analysis     - Linux command execution order control and pipeline (Linux)

- MongoDB query timeout exception SocketTimeoutException (Database)

- Zabbix monitoring of the switch (Server)

- Ansible module Know (Linux)

- There are three ways to run a Linux operating system from a USB stick (Linux)

- Linux kernel TCP / IP parameters analysis and tuning (Linux)

- Git commands (Linux)

- Adding SSH to Github (Linux)

- Add your own kernel and ramfs based on an existing Linux LiveCD (Linux)

- Oracle RMAN-06023 and ORA-19693 errors (Database)

- Java NIO1: I / O model overview (Programming)

- Use innobackupex full realization of MySQL hot backup (Database)

- Linux / UNIX: Use the dd command to create a 1GB size binary (Linux)

- Ubuntu 15.04 / 14.04 install Ubuntu After Install 2.6 (Linux)

- Workaround CentOS error message during compilation PHP5 common (Linux)

- Linux log management tools Logrotate (Linux)

- Linux processes in memory and memory cgroup statistics (Linux)

- Fedora10 use Git version Configuration Management (Linux)

- CentOS 6.5 installation and deployment SVN 1.8.10 (Linux)

- Debian (Wheezy) Install Redmine 2.6 (Programming)

 
         
  Oracle PLS-00231 error analysis
     
  Add Date : 2018-11-21      
         
         
         
  Oracle's PLS-00231 error analysis, this error is usually caused by access to the function, declared in the header for the total function of the unanimous vote, then place in enclaves declared dying function causes an error.
 
create or replace function Two
      return Number
      is
      begin
        return 2;
      end Two;
 create or replace procedure PrintTwo
      is
        myNum Number;
      begin
      select Two ()
      into myNum
      from dual;
      dbms_output.put_line (myNum);
    end PrintTwo;
 The above functions and procedures, on the functions and procedures declared, call normal. Note that two functions are printtwo procedure call in the form of sql statement.
 
Error If this second program segments into a package, the function of private way, then compile the package body, reported pls-00231 error, function can not use it in class sql statement.
 
For what reason?
 
pl sql and sql for oracel, it is two different engines, engines, and thus for sql, plsql package of two private function, can not be found.
 
So the package use two functions in two ways:
 
1 declared in the function header declaration in two upcoming two functions make public declaration, then you can select two into mynum from dual; formal calls, of course, this can not hide the two functions.
 
2 to mynum: = two; invoked, since in this way to pl sql parsing engine, so it can be used normally in a private manner declared two functions.
 
Visible need a suitable manner to expose the two functions sql or plsql engine before use. So if the two make public statements, but with the package name .two invoked, not the same can be positioned to the two functions? Oh, of course not, you do not forget the two public statements in the package it is not visible outside anyway haha.
 

So a set of functions for the package type of return, such as: FUNCTION strsplit (p_list IN VARCHAR2, p_sep IN VARCHAR2 DEFAULT '|')
    RETURN str_split
    PIPELINED;
 
str_split a custom collection type:
 
 TYPE "STR_SPLIT" IS TABLE OF VARCHAR2 (4000);
 
In this case, regardless of the type str_split statement in the package to public or private way, they were unable to properly use sql invoked, since the return of the collection, nor can plsql the kkk: = str_split invoked. In this case, it can only str_split defined as a custom data type oracle of:
 
create or replace TYPE "STR_SPLIT" IS TABLE OF VARCHAR2 (4000)
 
Then removed within the public or private packet type str_split defined, you can use sql calls the function.
     
         
         
         
  More:      
 
- Android Activity launchMode (Programming)
- Android Application Development: Genymotion can not start solving (Linux)
- When Vim create Python scripts, vim autocomplete interpreter and encoding method (Programming)
- Iptables small summary (Linux)
- Use DB2 federated access Oracle (Database)
- Based Docker build stand-alone high-availability cluster Hadoop2.7.1 Spark1.7 (Server)
- Create a DLL using MinGW and Attention (Programming)
- Confrontation dragged Library - Web front-end encryption slow (Linux)
- Shell commonly commands (Linux)
- CentOS6.5 setup Oracle 11gR2 startup (Database)
- Java-based data source database access (Programming)
- Xtrabackup creates a slave node without downtime (Database)
- Partition and file system under Linux (Linux)
- XenServer virtual machines installed in dual-card configuration (Server)
- Python variable type (Programming)
- Ubuntu 14.04 set auto sleep time (Linux)
- MySQL database master never solve the synchronization method (Database)
- Linux System Getting Started Learning: Using yum to download the RPM package without installing (Linux)
- Install Linux Mint 17: 20 things to do (Linux)
- About Git (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.