Forum Stats

  • 3,728,684 Users
  • 2,245,675 Discussions
  • 7,853,700 Comments

Discussions

How to reference and execute a plsql file uploaded in static files?

Jasper Tanglib
Jasper Tanglib Member Posts: 53 Green Ribbon
edited April 6 in APEX Discussions

In Oracle Apex 20.2, the Process is limiting my PL/SQL code and returns "Value too long by nn characters" instead. Is there a workaround to this? Is it possible in Apex to upload plsql_code.sql into Static Application Files and how do I reference it? Would want the code to execute when I click on the Upload button.


Any idea or suggestion is appreaciated.


- Jazz

Best Answers

  • Sylvain Martel
    Sylvain Martel Member Posts: 662 Bronze Trophy
    Accepted Answer

    Hello Jasper,

    Accessing PL/SQL from Static File doesn't exist. Go to SQL Workshop, and add the following line before your code in SQL Commands:

    create or replace procedure my_proc_name as
    

    and this at the end:

    end;
    

    Example:

    CREATE OR REPLACE PROCEDURE my_proc_name AS
    l_variable     number;
    
    begin
    l_variable := some_code ;
    your_code...;
    end;
    

    You might have to remove a DECLARE statement if you have one in your PL/SQL block. That's it!.

    In the process where you want to call the PL/SQL, enter something like:

    begin
    my_proc_name;
    end;
    

    Hope this helps!

  • InoL
    InoL Member Posts: 8,938 Silver Crown
    Accepted Answer

    You should use SQLDeveloper to create packages that exceed 32k.

    Connect with Oracle SQL Developer (18.2 or later)

    Jasper Tanglib

Answers

Sign In or Register to comment.