Perform the procedure on oracle apex online
Hi allCREATE OR REPLACE PROCEDURE TEST_PROC
AS
V_FNAME EMPLOYEES. FIRST_NAME % TYPE;
BEGIN
SELECT FIRST_NAME FROM V_FNAME OF EMPLOYEES
WHERE NAME = 'JOHN ';
DBMS_OUT. PUT_LINE (V_FNAME);
END;
I did this procedure on the http://apex.oracle.com/ sql worksheet on my account.
When I gave TEST_PROC RUN; and CALL TEST_PROC; order for providing this procedure I get ORA-00900 following error: invalid SQL statement.
Please tell how I can perform this procedure.
Thanks in advance.
concerning
Neeraj
Calls to PL/SQL must be made using anonymous PL/SQL code blocks. For example
begin
Test_Proc;
end;
There is no server EXECUTE command (some customer support this as a sales order, wraps the content to run in an anonymous PL/SQL block and then use it to call the database).
Tags: Database
Similar Questions
-
Execution of the procedure of Oracle APEX
Hello
I've written a procedure ' create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2); " et I want to execute this procedure to Oracle Apex.
PROCEDURE:
create or replace PROCEDURE process_csvfile(p_filename IN VARCHAR2) AS statement1 varchar2(1000); statement2 varchar2(1000); statement3 varchar2(1000); begin dbms_output.put_Line(p_filename ); statement1:= 'alter table adb.external_bcc_test location ( ' ||chr(39)|| p_filename||chr(39)|| ')' ; dbms_output.put_line(statement1); EXECUTE immediate statement1; dbms_output.put_line('statement1-> completed'); EXECUTE immediate 'truncate table ADB.ADB_BCC_TEST'; dbms_output.put_line('statement2-> completed'); statement3:='insert /*+ append */ into ADB.ADB_BCC_TEST(BCC_ID,BCC_ADD,"NO_OF_BCC(GEO)") select * from adb.external_BCC_test'; dbms_output.put_line(statement3); EXECUTE immediate statement3; dbms_output.put_line('statement3 insert-> completed'); EXCEPTION WHEN OTHERS then raise; END;
I created the button and the action as a dynamic Action where I wrote below PL/SQ as dynamic Action to perform this procedure
BEGIN process_csvfile; END;
But I get an error" " " ORA-06550: line 4, column 3: PLS-00306: wrong number or types of arguments in the call to 'PROCESS_CSVFILE' ORA-06550: line 4, column 3: PL/SQL: statement ignored (go to error) "
Oracle Apex Version: 4.2.1
Thank you
BO.
BO123 wrote:
I've written a procedure ' create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2); " and I want to run this procedure from Oracle Apex.
- create or replace PROCEDURE process_csvfile (p_filename IN VARCHAR2)
- AS
- statement1 varchar2 (1000);
- statement2 varchar2 (1000);
- statement3 varchar2 (1000);
- Start
- dbms_output.put_Line (p_filename);
- statement1: = ' change the location of the table adb.external_bcc_test (' |) Chr (39) | p_filename | Chr (39) | ')' ;
- dbms_output.put_line (statement1);
- EXECUTE immediate statement1;
- dbms_output.put_line ('end statement1->');
- EXECUTE immediate ' truncate table ADB. ADB_BCC_TEST';
- dbms_output.put_line ('end of reporting2->');
- statement3: = "insert / * + append * / into ADB." ADB_BCC_TEST (BCC_ID, BCC_ADD, ' NO_OF_BCC (GEO) ') select * from adb.external_BCC_test';
- dbms_output.put_line (statement3);
- EXECUTE immediate statement3;
- dbms_output.put_line ('end statement3 insertion->');
- EXCEPTION
- WHILE OTHERS
- then
- lift;
- END;
The treatment is an external table. How to get the source file in the specified location?
dbms_output.put_line
the instrumentation is unnecessary in an environment of APEX (unless theapex_debug.log_dbms_output
method has been called). Useapex_debug
API methods instead so that information is available in debug mode.There is no reason to use dynamic SQL statements in lines 15-17.
Creating a column named "NO_OF_BCC (GEO)" is not a good idea and is in conflict with the recommendation of the Oracle do not use identifiers in quotes for the names of database objects. This objects will only cause problems and confusion.
Lines 20 to 23 are a bug. It doesn't hide where any exception occurred in fact. If there is no specific exception that must be handled in this procedure, it should not contain an exception block.
-
turn off text while performing the procedure
Hello
Oracle9i
How to disable the text while performing the procedure below?
15 old: Procedure_name(&var1);
15 new: Procedure_name(&var2);
ConcerningUse SET CHECK TURNED off.
It won't make any difference in the results you get, but it's just for you to see which variable is getting replaced by what value. -
Understand the hidden on Oracle APEX page and form variables
Hi all
I got to know < form > < / form > apex when Paul said my glitch here:
{message: id = 10072264}
Now when I checked out one of the forms on the page of the APEX, I was following markup:
Now, these things hidden?<form id="wwvFlowForm" name="wwv_flow" method="post" action="wwv_flow.accept"> <input id="pFlowId" type="hidden" value="122" name="p_flow_id"> <input id="pFlowStepId" type="hidden" value="42" name="p_flow_step_id"> <input id="pInstance" type="hidden" value="643064511551379" name="p_instance"> <input id="pPageSubmissionId" type="hidden" value="3482959593030363" name="p_page_submission_id"> <input id="pRequest" type="hidden" value="" name="p_request">
< ul >
pFlowId < li > < /li >
pFlowStepId < li > < /li >
pInstance < li > < /li >
pPageSubmissionId < li > < /li >
pRequest < li > < /li >
< /ul >
On digging the question, I found four of them:
< ul >
< li > pFlowId: identifies the ID of the currently running application. Substitution of PL/SQL string - APP_ID (used as *: APP_PAGE_ID, NV('APP_PAGE_ID'), & APP_PAGE_ID.*) < /li >
< li > pFlowStepId: identifies the ID of the currently running application page. Substitution of PL/SQL string - APP_PAGE_ID < /li >
< li > pInstance: identifies the session ID for the user of the application running. Substitution of PL/SQL string - APP_SESSION < /li >
< li > pRequest: identifies the query passed to the page of the currently running application. Substitution of PL/SQL string - REQUEST < /li >
< /ul >
Now my questions are:
< ul >
< li > what is pPageSubmissionId ? Is there any alternative of PL/SQL string for her? This is one of them:
http://docs.Oracle.com/CD/E23903_01/doc/ doc.41 /e21674/concept_sub.htm#BEIIBAJD
< /li >
< li > I inspected an other forms and find the same code snippet:
What is the wwv_flow.accept in the form action attribute? (I guess the procedure submission form) How does it work?<form id="wwvFlowForm" name="wwv_flow" method="post" action="wwv_flow.accept">
< /li >
can < li > I change the attributes id, name and method of form element? For example we have method get or a different form name or id? < /li >
< /ul >
Kind regards
KiranKiran says:
What is pPageSubmissionId ?
See + {: identifier of the thread = 720469} +.
Is there any alternative of PL/SQL string for her? This is one of them:
http://docs.Oracle.com/CD/E23903_01/doc/doc.41/e21674/concept_sub.htm#BEIIBAJDN °
I inspected an other forms and find the same code snippet:
What is the wwv_flow.accept in the form action attribute? (I guess the procedure submission form)
Guess correct. It is the process of wwv_flow.accept in the package of the diagram of the APEX_xxxxxx wwv_flow , which is commented "+ this procedure accepts virtually every page flow +".
How does it work?
See apex_xxxxxx.wwv_flow to Developer SQL package specification (or whatever IDE you use). Notice how the first parameters of the procedure to accept corresponding to the attributes name HTML elements entry that you have identified? Others include some that match the name of the page elements attributes (name = "p_t01" etc. - There are 100 of those: the source of the page/article in the APEX 100 limit) and 50 f01-f50 parameters in a table /apex_item- generated controls.
Overly simplified: the browser - HTML and HTTP - specification generates an HTTP request for the form that includes all the names of form controls and the values; It is passed to the web server, which recognizes the URL and its configuration which demand must be managed by the apex_xxxxxx.wwv_flow.accept procedure and call it, match the settings in the HTTP request with those of the package procedure.
Running an application in a browser that includes development tools that allow you to inspect HTTP requests (I use the network view in Safari Web Inspector). After sending a page, display the generated queries and you will be able to see the form data in the request payload.
Can we change the attributes id, name and method of form element? For example we have method get or a different form name or id?
Not in such a way that you would still use APEX.
Essentially, this is why you use APEX: he manages all aspects of low level, leaving to focus you on the real needs of your applications.
-
Error of the ACLs in Oracle Apex 5 after schema change
Hi all
I'm creating an application using Oracle Apex 5.
I have a button call Send Mail and mail is worked.
Now, I imported my request in a different schema and configured acl as below.
I use apex_mail.send to send mail and created the acl as
BEGIN
() DBMS_NETWORK_ACL_ADMIN.drop_acl
ACL = > 'open_apex.xml');
(DBMS_NETWORK_ACL_ADMIN). CREATE_ACL
ACL = > "open_apex.xml"
Description = > "a test of the ACL feature."
main = > 'RMSR. "
IS_GRANT = > TRUE,
privilege = > 'connection ',.
start_date = > SYSTIMESTAMP,
End_date = > NULL);
(DBMS_NETWORK_ACL_ADMIN). ASSIGN_ACL
ACL = > "open_apex.xml"
Home = > ' *',
lower_port = > 20,
upper_port = > 9999);
COMMIT;
end;
BEGIN
(DBMS_NETWORK_ACL_ADMIN). ADD_PRIVILEGE
ACL = > "open_apex.xml"
main = > 'RMSR. "
IS_GRANT = > TRUE,
privilege = > 'connection ',.
position = > NULL,
start_date = > NULL,
End_date = > NULL);
COMMIT;
END;
It throws error as
ORA-24247: network access denied by access control list (ACL)
Is there a problem in my setup?
Thanks in advance,
Su.GI
Hi Su.gi,
Su.GI wrote:
I'm creating an application using Oracle Apex 5.
I have a button call Send Mail and mail is worked.
Now, I imported my request in a different schema and configured acl as below.
It throws error as
ORA-24247: network access denied by access control list (ACL)
Is there a problem in my setup?
You have granted the ACL to the RMSR of your database schema, so it is necessary for the APEX_050000 scheme when you use the APEX_MAIL package.
This is why the ACL must be granted at the APEX 5 Schema: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29161
Here's how the ACL must be granted for APEX 5 Schema: https://docs.oracle.com/cd/E59726_01/install.50/e39144/listener.htm#HTMIG29162
NOTE:
- Create the ACL by logging into the user with SYSDBA SYS privileges.
- Don't forget to validate after execution of the anonymous block for the creation of ACL.
Kind regards
Kiran
-
Problem of ScrollBar in the sidebar region Oracle Apex
Hi all
I'm developing an application using Oracle Apex 4.2.5.
Application properties:
Themes request theme 26 productivity =
Model = a level with left sidebar tab
I created menu Tree in the sidebar left.
I used the code below in the region attribute
STYLE = "overflow-x: scroll;" overflow - y: scroll; height: 500px; "width: 220px".
If I develop the tree node overflow - y: scroll works fine, but overflow-x: scrolling does not work.
My problem is overflow-x: scrolling does not work.
How to solve this problem?
Thank you
Su.GI
She's.
I have power to change anything else. You can include height too, if you need, however, is fine.
(Please check the answer correct or useful, if you think that it helped you)
Thank you
Sunil Bhatia
-
Alignment of the table in Oracle Apex
Hi all
I use Oracle Apex 4.2.5 for application development. I used 26 theme.
In my page I used the Template of the Page as a level with the sidebar tab left. Graphic design and report on this Page.
I created a button to hide / show the sidebar.
When I hide the sidebar, then more space white bar inside the graph. (chart appear somewhere not in the Center)
My requirement is necessary reduce the white space (or center the graph) when the sidebar is leather.
Here is my sample application to apex.oracle.com.
Application name: chart
Application ID: 36667
Sugi_demo = workspace
Username = my_demo
password = my_demo
Thank you
Su.GI
Hi Su.gi,
Please check the application now.
I removed the width fixed 530px and centered on the chart.
I have used Inline CSS in the page attributes:
object { margin: 0 auto !important; }
I hope this helps!
Kind regards
Kiran
-
I have the classic report in oracle apex
with query below
Select EMPNO, ENAME, HIREDATE, ADDRESS of emp COMM;
If the ENAME = "John".
so, I want to do any "BOLD" line and readonly/inactive. (set of rank who name John)
Thanks in advance...
Simple answer: see this blog: reports APEX: color line based on column value
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL -
Impossible to perform the procedure because of the error in the OWA_UTIL package
Hello
I wrote a nice PL/SQL procedure called "send_notification '... My procedure starts like this:
Well, the procedure is compiled without errors. When I run the procedure 'send_notification', I get these error messages:create or replace procedure send_notification is ws_id number; l_body clob; l_url varchar2(256); l_cgi_var_name varchar2(100) default 'SERVER_NAME'; l_server_name varchar2(2000) ; begin l_server_name := owa_util.get_cgi_env(l_cgi_var_name) ; .....
ORA-06502: PL/SQL: digital error or error on a value
ORA-06512: at "SYS. OWA_UTIL", line 356
ORA-06512: at "SIVOA. SEND_NOTIFICATION", line 10
ORA-06512: at line 2
Lines 354-356 of the OWA package. UTIL shows this:
function get_cgi_env (param_name in varchar2) return varchar2 is
upper_param_name varchar2 (2000): = upper (param_name);
Start
I've successfully compiled the OWA_UTIL package.
Thank you for your help.
ChristianHi Christian,
I found a discussion that mentions your problem. See the link below:
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:232814159006From there on, I saw the following:
July 25, 2005-07:00 Central time zone monitoring:
because you do not call it on the web, owa packages have not been initialized.
declare
OWA.vc_arr nm;> owa.vc_arr vl.
Start
NM (1): = 'X '.
VL (1): = 'Y ';
OWA.init_cgi_env (nm.count, nm, vl);
end;
/First run.
As well as:
January 30, 2009-13:00 time zone Central Monitoring:
so, you need to run it from a web browser. HTP - which is used - stuff belongs to mod_plsql.
Toad wouldn't have the slightest idea what to do with such things.
HTH,
ThierryPublished by: Urgent-IT on January 19, 2011 11:35
-
How to perform the procedure of the schema A b schema?
Hello...
I have a doubt... Please specify it.
There are 2 tables and procedure on the tables in A schema.
How to perform this procedure in the diagram B?
I have to give privileges?
Thank you
SAIHello
You must grant execute on the package in plan a plan b. You then Norman to either create a synonym in plan B or the fully qualified name of the call, for example
exec schemea.my_package;
-
How to perform the procedure with parameters of type collection
Hello
I have the setting as the procedure
CREATE OR REPLACE TYPE NUMBERLIST AS TABLE NUMBER;PROCEDURE addGroup ( Id IN NUMBER, sId IN NUMBER, gIds IN NUMBERLIST)
/
could you help me by asking this type as a parameter the procedure...
Thank youThis is the type:
SQL> create or replace type NUMBERLIST is table of number; 2 / Type created.
This is the procedure:
SQL> create or replace PROCEDURE addGroup ( 2 Id IN NUMBER, 3 sId IN NUMBER, 4 gIds IN NUMBERLIST) 5 is 6 begin 7 null; 8 end; 9 / Procedure created.
And you call it this way:
SQL> declare 2 n numberlist := numberlist(1,2,3,4); 3 begin 4 addGroup(1,2,n); 5 end; 6 / PL/SQL procedure successfully completed.
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/01/23/la-forza-del-foglio-di-calcolo-in-una-query-la-clausola-model/] -
Problems with the date in the procedure on Oracle 11 g
Hi gurus,
I have some problems with the date under Oracle 11 g format.
Let me explain the situation:
When I start such a request
Select to_number (to_char (to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'))
of sys.dual
I had as a result 2009 under the number.
When I do the same thing in a procedure of a package like this
my_year: = to_number (to_char (to_date('01.04.2009','dd.mm.yyyy'), 'yyyy'));
the my_year variable contains the value 9 instead of 2009.
Can someone explain to me what goes wrong?
I just tested with the evolution of the variable nls_date_format of environment for the session and the database is complete without success.
Kind regards
BjörnYes, it has everything to do with your environment settings.
SQL> set serveroutput on; SQL> SQL> declare 2 my_date date; 3 my_zeitstempel varchar2(32767); 4 my_tageswechsel float; 5 begin 6 my_zeitstempel := '01.03.1998 07:00'; 7 my_tageswechsel := .25; 8 my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24; 9 dbms_output.put_line( my_date); 10 end; 11 / 01-MAR-98 PL/SQL procedure successfully completed. SQL> alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss' 2 / Session altered. SQL> declare 2 my_date date; 3 my_zeitstempel varchar2(32767); 4 my_tageswechsel float; 5 begin 6 my_zeitstempel := '01.03.1998 07:00'; 7 my_tageswechsel := .25; 8 my_date := to_date (substr (my_zeitstempel, 1, 10), 'dd.mm.yyyy') + my_tageswechsel +1/24; 9 dbms_output.put_line( my_date); 10 end; 11 / 01.03.1998 07:00:00 PL/SQL procedure successfully completed.
-
How to perform the procedure packed (with some param) in TOAD for Oracle
Hello.
Could you help me
How to run the packaged procedure with parameters in TOAD to Oralce...
Thank you...Use anonymous PL/SQL block to run it.
For example.
DECLARE
; BEGIN . ( ); END; -
deletion line causes the error after clicking on the button Delete: oracle Apex 5.0
helloo...
Use: Under shape whenever I checked and click on Remove button works fine.
According to the need on my project, I took a default editable TEXT FIELD. Now, I did this TEXT FIELD on the SCREEN only.
so now if click the button Delete after checking the check box I get below error.
Session state protection violation:
This can be caused by manually editing the protected element p11_total.
Thank you
Pranav shah
Hi Dominique,.
Pranav.Shah wrote:
helloo...
Use: Under shape whenever I checked and click on Remove button works fine.
According to the need on my project, I took a default editable TEXT FIELD. Now, I did this TEXT FIELD on the SCREEN only.
so now if click the button Delete after checking the check box I get below error.
Session state protection violation:
This can be caused by manually editing the protected element p11_total.
Thank you
Pranav shah
Change your display-only item and do save the State of session No.
or create the sample on apex.oracle.com and share credentials with us.
Kind regards
Jitendra
-
Hello
create or replace type PPT_TYPE
AS
object
(
PPT_SYMB_CODE VARCHAR2 (10 BYTE),
PPT_BATE_CODE VARCHAR2 (1 BYTE),
DATE OF PPT_ASSESS_DATE,
PPT_PRICE NUMBER (18.6).
PPT_CORRECTED VARCHAR2 (1 BYTE),
PPT_MODIFIED_BY VARCHAR2 (30 BYTE),
DATE OF PPT_MODIFIED_DATE);
create or replace type PPT_TABLE_TYPE as the PPT_TYPE table;
create or replace PROCEDURE proc_ins_test (P_PPT_TAB IN PPT_TABLE_TYPE)
as
.
.
.
.
.
end proc_ins_test;
How to run the above procedure?
Kind regards
Fame
Ago
Got it, thanks for all.
DECLARE
P_PPT_TAB DDM. PPT_TABLE_TYPE;
BEGIN
P_PPT_TAB: is PPT_TABLE_TYPE (PPT_TYPE('ENCOC34','u','29-JAN-15','60100','N','MDD','24-FEB-15'));.
() proc_ins_test
P_PPT_TAB-ONLINE P_PPT_TAB
);
END;
Maybe you are looking for
-
My wife was making safety messages on his iPad wanting him to verify his identity. His apple ID email became inactive months and trying to check on the website of apple ID, it was wanting to send a verification email to the wrong e-mail address. I d
-
Satellite M70 runs for several seconds and then hangs
Hello I have a Satellite M70. My problem started several weeks ago with the laptop freezing. Then it blue screened a couple of times. Now when I start it, it runs for a few seconds and then hangs. I can't do anything because the screen is blank but t
-
Failed to save the UI resource file...
Hi all I have to pass a CVI 6a 2013 CVI. After working the binding DLLS/LIBs now everything compiles and links fine and the exe works as expected. But there are some users that I have to edit resource files. As soon as I open one of them (a few secon
-
Windows Vista updates (12 April 2010) broke all the desktop shortcuts
On 13 April, I fist notice this problem. I managed to it is resolved according to restore my computer to a previous point prior to the windows vista update have been installed. I didn't create a new restore point and also forgot to uncheck "automatic
-
I tried to install adobe, but said he can't because firefox is always on, I tried to uninstall it and download a new version, but it wouldn't let me.