All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sonar.l10n.plsqlopen.rules.plsql.CursorBodyInPackageSpec.html Maven / Gradle / Ivy

The newest version!

Cursor declarations can be splitted in two parts: specification and body. When declaring a cursor in a package specification, the package specification should contains only the cursor specification and the cursor body should be added to the package body.

In newer versions of Oracle Forms, the usage of cursors declared with body in a package specification also causes the compilation error "internal error [Unexpected fragile external reference.]".

Noncompliant Code Example

create or replace package pkg is
  cursor cur is
    select dummy from dual;
end;

Compliant Solution

create or replace package pkg is
  type cur_type is record(dummy varchar2(1));
  cursor cur return cur_type;
end;
/
create or replace package body pkg is
  cursor cur return cur_type is
    select dummy from dual;
end;
/




© 2015 - 2025 Weber Informatics LLC | Privacy Policy