Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Database \ Oracle PLS-00231 error analysis     - Ubuntu install virtual machine software VirtualBox 4.3.10 (Linux)

- 3 tips Linux command (Linux)

- About Nginx 7 (Server)

- How to set up FTP server on Linux (Server)

- DB2 Version SQLJ to access Oracle Server (Database)

- Linux RAID Set RAID 10 or 0 + 1 (Linux)

- Linux SU command security Suggestions (Linux)

- Hazelcast integration with MongoDB (Database)

- CMake Quick Start Tutorial (Linux)

- Spring inject a type of object to enumerate (Programming)

- ARM runtime environment built from scratch using QEMU emulator (Linux)

- Java implementation linear table - represents the order of representation and chain (Programming)

- How to use the TF / SD card making Exynos 4412 u-boot boot disk in Mac (Linux)

- Batch download files using the explorer under Windows Server 2008 R2 (Server)

- Compare Swift achieve rapid sorting and sorted Methods (Programming)

- Create several practical points of high security PHP site (Linux)

- To use Android RecyclerView (Programming)

- AngularJS - Getting Started with Routing (Programming)

- You really do need to know a variety of programming languages (Programming)

- RHEL7 Apache MPM configuration (Server)

  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
        return 2;
      end Two;
 create or replace procedure PrintTwo
        myNum Number;
      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
str_split a custom collection type:
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.
- Puppet installation and testing (Server)
- Linux security settings (Linux)
- exp / imp Export Import version of the problem and the ORA-6550 error (Database)
- The method to mount the CD under Linux (Linux)
- Install Oracle JDK 8 and JVM class loading mechanism in Linux (Linux)
- Binary Tree Traversal (Linux)
- Getting Started with Linux system to learn: How to compress JPEG images on the command line (Linux)
- To remove those IP is prohibited Fail2ban on CentOS 6/7 (Server)
- Linux common network tools: batch scanning of hosting services netcat (Linux)
- JSON Introduction and Usage Summary (Programming)
- Processor in protected mode of protection (Linux)
- Enterprise Encrypting File System eCryptfs Comments (Linux)
- VPS xen openvz kvm (Server)
- Big Data Common Glossary (Linux)
- Java coding conventions (Programming)
- Remote installation of Net-SNMP whole process (Linux)
- Recover Ubuntu 14.04 wakes up from standby in case mouse keyboard appears dead (Linux)
- By creating a personal technology blog Detailed GitHub (Linux)
- rpm package specify the installation path (Linux)
- Linux System Getting Started Learning: the Linux Wireshark interface dead solve (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.