Forum Stats

  • 3,768,991 Users
  • 2,252,892 Discussions
  • 7,874,830 Comments

Discussions

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

Jasper Tanglib
Jasper Tanglib Member Posts: 67 Green Ribbon
edited Apr 6, 2021 12:46PM 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: 743 Silver 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: 9,337 Gold 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