Run the procedure once a year
I have a procedure files and creating sequences that are used as serial numbers for some forms.For the moment, the admin user must click on a button, once a year to perform the procedure.
I need to do this automatically every year eg 06:00 on 1 January.
Can someone point me in the right direction
Gus
Hello
At least you have some time to think about it! ;)
Have a look/google for DBMS_SCHEDULER - which should sort out you.
See you soon
Ben
Tags: Database
Similar Questions
-
Cannot run the procedure several times
Hello
I use oracle 12 c
I just created a stored procedure that works very well
Problem is that the second time I run it, it does not what it should (data fusion)
When I run the second time I always get PL/SQL procedure successfully completed but the target table is still empty, here is the procedure:
1 create or replace procedure MERGE_TABLEA
2 as
3. start
4 MERGE TABLE_A has B (SELECT 'ID', 'NAME' OF TABLE_B) with the HELP of
ON (A.ID = B.ID)
WHEN MATCHED THEN
UPDATE SET B.SID = B.NAME
WHEN NOT MATCHED THEN
INSERT (A.' ID',' NAME')
VALUES (B.ID, B.NAME);
END;
/
PL/SQL procedure successfully completed.
I also tried to build a simple procedure that id just insert and name of the table to test ina and it works very well, no matter how many times I've run it
Is it maybe something with the merger or what?
Thank you!
OK guys, I think there are some misunderstandings here,
@ddf_dba_ifox , version of the db that I use is stated in the first line of my post, I can't publish data for security reasons
@rp0428 I forgot to mention that I'M to truncate the table, and then run the procedure again but the merger no longer works as the table is empty
In any case, I found out why
I'm merging the tables in the DB using the schema that is related to my installation of Oracle APEX
In the procedure if you notice there is no COMMIT
As apex has users within a schema, that I couldn't see the lines without committing before
Thank you all anyway!
-
Run the code once when loading the form
Hi guys,.
I have a text field (TextField1), which fills with a value (1-100)
During the initial loading of the form, this value will be the highest.
When the user navigates around the shape, this number will change (lower than initial load)
I have another text field (TextField2) on the form I want to keep the original value to the loading of the form.
something like: TextField2.rawValue = TextField1.rawValue
But any event that I put in it always updates TextField2 with TextField1 value (not does not run the code once when loading the form)
Can someone tell how can I do this?
If the form is loaded with the number 70 as a value in TextField1 - TextField2 has 70 as a value and maintains this value regardless of what TextField1 goes to...
Thanks a lot for any help
try putting in the TextField2 docReady event:
$ = TextField1.rawValue
-
Run the procedure after the application deployment
Hi all
I faced a small question.
When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
It takes to update some records in the system tables.
Apex supports characteristic or something like that?
APEX 4.1
Thank you
Published by: Rod 13.05.2013 confidence 0:56Cane Trust wrote:
I faced a small question.
When I deploy my application to another server - it must run a procedure (this means that the procedure must be run once immediately after successful deployment).
It takes to update some records in the system tables.Apex supports characteristic or something like that?
APEX 4.1
How do you deploy your application? The documentation contains all the details of creating a packaged application with all dependencies for database included as items of support. Your procedure must be performed in one of these objects support scripts.
-
Run the procedure by table number
Hello
Oracle 11.2.0.1
Windows
Create the np_type type is varray (3) of the number
/
Create the cn_type type is varray (3) the number;
/
Create the cxn_type type is varray (3) of varchar2 (2000)
/
I created the TEST table by pl/sql block below:
declare
execstr varchar2 (2000): =' create table test(';)
Start
because me in 1.80 loop
execstr: = execstr | 'col ' | TO_CHAR (i) | 'number,';
end loop;
execstr: = substr (execstr, 1, length (execstr)-1);
execstr: = execstr | ')';
dbms_output.put_line (execstr);
run immediately execstr;
end;
/
create the table sp_table (Splitid number, Delimiterlength number);
insert into sp_table values (1.4);
insert into sp_table values (2.7);
insert into sp_table values (3.9);
insert into sp_table values (4.1);
insert into sp_table values (5.2);
insert into sp_table values (6,6);
create or replace procedure myproc1
(
STRX in varchar2, delarray in np_type)
as
execstr varchar2 (2000);
CN cn_type.
CXN cxn_type;
XPos number: = 1;
Start
execstr: = ' insert into test values(';)
because loop me in 1.3
Select Delimiterlength in the sp_table (i) cn where Splitid = delarray (i);
CXN (i):=substr(STRX,XPos,CN(i));
execstr: = execstr | CXN (i) | ',';
XPos: = (i) cn + xpos;
end loop;
execstr: = RTRIM (execstr, ','). ')';
dbms_output.put_line (execstr);
-execution immediate execstr;
end;
/
The procedure above will insert the numbered string supplied in the test table that splits the chain numbered inspires provided splitids of sp_table.SQL> declare 2 v np_type:=np_type(4,4,4); 3 begin 4 --dbms_output.put_line(v(3)); 5 exec myproc1('111',v); 6 end; 7 / exec myproc1('111',v); * ERROR at line 5: ORA-06550: line 5, column 8: PLS-00103: Encountered the symbol "MYPROC1" when expecting one of the following: := . ( @ % ; The symbol ":=" was substituted for "MYPROC1" to continue. SQL>
In fact, I tried to help a member of the forum for his question, but I'm not get where I get the above error. Of course, there is little that miss me, but not that. This thread is running too in this forum.
Please help me.
Concerning
Girish Sharmacreate or replace procedure myproc1 ( strx in varchar2, delarray in np_type) as execstr varchar2(2000); cn cn_type := cn_type(null, null, null); cxn cxn_type := cxn_type(null, null, null); xpos number:=1; begin execstr := 'insert into test values('; for i in 1..3 loop select Delimiterlength into cn(i) from sp_table where Splitid = delarray(i); cxn(i):=substr(strx,xpos,cn(i)); execstr :=execstr || cxn(i) || ','; xpos :=cn(i) + xpos; end loop; execstr := RTRIM(execstr,',')|| ')'; dbms_output.put_line(execstr); --execute immediate execstr; end; /
and
declare a1 number :=4; a2 number :=4; a3 number :=4; v np_type:=np_type(a1,a2,a3); begin for i in 1..3 loop dbms_output.put_line('v(' || i || ') = ' || v(i)); end loop; myproc1('111',v); end; /
Your varrays are null or empty in myproc1
-
run the query once vo in a page/region
Hi the OAF Experts,
I have a region that is running a VO to processRequest. Now, when I navigate to the next page OR click on a sub-tab to take me in another region (the other region of the sub-tab has its own controller), the VO is rerun when I return to the same region. I want to only execute the vo ONCE when it is called from a source page (the page source in this matter is the hierarchy of HR). How can I do this? It seems that PPR is the answer, but I can't find anywhere, any example. Please can anyone help shed light on this? Is there an example of code that I can watch?
Thank you very much.Use if (! vo.isPreparedForExecution ()) {vo.executeQuery ()}
-
Run the procedure works without slash
It's weird.
I'm in a plsql connected to a database session.
I can run a procedure as follows:
run status_pkg.check_owner_vcard (1,1,2);
However, I would like eventually to use variables, but when I try to do something like this:
SQL > declare
2 start
3 run status_pkg.check_owner_vcard (1,1,2);
4 end;
7 m
run status_pkg.check_owner_vcard (1,1,2);
*
ERROR at line 3:
ORA-06550: line 3, column 9:
PLS-00103: encountered the symbol "STATUS_PKG" when awaits an of the
Next:
:= . (@ %; immediate)
The symbol ': = ' was replaced by 'STATUS_PKG' continue.
It is not a function - procedure which could wait for oracle?
Any help appreciated
Rgds
Petersqlplus command does not work inside a plsql block. Remove it and your block should run.
-
Hello
I'm able to run this procedure.
I created the procedure successfully.
CREATE OR REPLACE PROCEDURE update_LOGIN_TABLE (NAMER OUT VARCHAR2)
IS
temp_num NUMBER;
BEGIN
temp_num: = 10;
DBMS_OUTPUT. Put_line (temp_num);
Setting a DAY to the USER SET NAME = 'Ranga' where NAME = NAMER;
COMMIT;
EXCEPTION
WHILE OTHERS THEN
ROLLBACK;
END update_LOGIN_TABLE;
*/*
It comes to my Table Structure:
SQL > select * from users;
PASS NAME
-------------------- --------------------
Sai Baba
SAI Natha
roux keyboard
roux keyboard
When I tried to run, I get this: execute update_LOGIN_TABLE ('good');
SQL > execute update_LOGIN_TABLE ('good');
BEGIN update_LOGIN_TABLE ('good'); END;
***
ERROR on line 1:
ORA-06550: line 1, column 26:
PLS-00363: 'delighted' expression cannot serve a purpose of assignment
ORA-06550: line 1, column 7:
PL/SQL: Statement ignoredupdate_LOGIN_TABLE (NAMER OUT VARCHAR2)
I think you probably wanted an IN argument in your procedure.
-
Apex 4. Run the procedure to recover my files
Dear all,
I experience a problem moving my apex application (sss) to a new server.
I export demand for 3.2 APEX to APEX 4.0 new
+ transfer of data using a simple DB dump (export).
Everything will work perfectly except our main application functionality, sitting on the workspace of "HR_PRD" that we have a few problems.
In our DB schema called "HR_REP" I have a table that stores BLOBs for download a document attached to a record of the employee.
So I created a package that contains the custom procedure to download the files stored in the table "wr_docs".
URL = http://sphfrapex01.hopfr.net.fr.ch:8080/apex/HR_PROD.wr_apputil.download_my_file?p_file=3655106341169143
I can download the file whithout any problems and it appears correctly in the report showing all my files.
BUT when it tries to download... Unfortunately, access to the file does not work on the new APEX 4.0 platform!
As this sounds like a simple question 'rights', I did several tests...
I tried to create a simple procedure on my 'old' server called 'TEST' which simply print a simple text:
HTP. ("test to print something");
Here, I granted AUDIENCE to perform this procedure.
It works well on the APEX 3.2 platform when on the new APEX 4.0, refusal to execute the procedure.
Can you help me please?
I'm certainly missing something obvious thanks to the GRANT run the TEST at?
I granted AUDIENCE, so the appeal should work...
I have to admit, I'm a bit lost here.
Thanks in advance for your help.
Philippe KilchoerHi Philippe,.
using EPG to APEX? You may have forgotten to update WWV_FLOW_EPG_INCLUDE_MOD_LOCAL to include your procedure. Take a look on
http://download.Oracle.com/docs/CD/E14373_01/AppDev.32/e13363/up_dn_files.htm#CJACBEHG
Concerning
Patrick
-----------
My Blog: http://www.inside-oracle-apex.com
APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins -
Hello world
I am trying to execute the procedure below,
CREATE or REPLACE procedure test1 (n1 n2 in number, number, tot OUT number)
is
i the number: = null;
Start
loop
If n2 > n1 then
i: = i + 1;
tot: = n1 + i;
dbms_output.put_line (tot);
elsif n2 < 1 then
dbms_output.put_line ('enter a higher value for n2');
end if;
end loop;
end;
/
All I'm trying to do is to print the numbers according to the values we give during execution, but doesn't seem to work for me.
IE.,.
N1 = 1;
N2 = 5;
tot = 1,2,3,4,5;
I'm sorry if there is a mistake in the procedure and would be really grateful if you can help me with this. Thanks in advance for your help.
Published by: Pravin on August 31, 2010 14:25If you want you can use this code it has the same logic
CREATE OR REPLACE procedure test1(n1 IN number, n2 IN number, tot OUT number) is cnt number := 0; begin if n2 < n1 then dbms_output.put_line('Enter a higher value for n2'); end if; for i in n1 .. n2 loop dbms_output.put_line(i); cnt := cnt + 1; end loop; tot := cnt; end test1;
-
Try to run the procedure and get an error PLS-00103
I have a procedure defined with these parameters
create or replace PROCEDURE procAuth
(
EMAIL IN VARCHAR2,
PASSWORD IN VARCHAR2,
IP IN VARCHAR2,
UL NUMBER
)
Using this code
var x number
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
print x
gives me
Error at startup on line 2 of the command:
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1': x);
Error report:
ORA-06550: line 1, column 65:
PLS-00103: encountered the symbol "" when expecting one of the following values:
. ( ) , * @ % & | = + - <>/ at is mod not rank rem = >
.. < an exponent (*) > <>or! = or ~ = > = < = <>and or as
between |
The symbol ',' was replaced by ' ' to continue.
06550 00000 - "line %s, column % s:\n%s".
* Cause: Usually a PL/SQL compilation error.
* Action:
x
------
Thanks for any helpjerry8989 wrote:
I have a procedure defined with these parameterscreate or replace PROCEDURE procAuth
(
EMAIL IN VARCHAR2,
PASSWORD IN VARCHAR2,
IP IN VARCHAR2,
UL NUMBER
)Using this code
var x number
exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);
print xgives me
Error at startup on line 2 of the command:
exec procAuth (' [email protected]', '555555',' 1.1.1.1': x);a comma is perhaps missing to the right of the right like apostrophe below?
procAuth exec ('[email protected]', ' 555555 ', ' 1.1.1.1',: x);
-
How can I run the procedure without parameters.
CREATE OR REPLACE PROCEDURE P1 ((nvl(A,'dkjf') VARCHAR2)
IS
BEGIN
DBMS_OUTPUT. PUT_LINE(A||',');
END;
It gives me error
I want to run in this mode exec p1;
It should automatically take dkjf as a parameter;
help required on this.CREATE OR REPLACE PROCEDURE P1 ( A VARCHAR2 default 'dkjf' ) IS BEGIN DBMS_OUTPUT.PUT_LINE(A||','); END; begin p1; end;
What do you expect?
-
How can I perform this procedure
create or replace procedure hr.testemp ( in_empno in number, out_name out varchar2, many_found_ out varchar2, err_i out varchar2, err_msg out varchar2 execute hr.testemp(09998,null,null,null,null)
Hi Alex,
you need a few variables that can receive your output settings.
Try something like this:
declare out1 varchar2(100); out2 varchar2(100); out3 varchar2(100); out4 varchar2(100); begin hr.testemp(09998,out1,out2,out3,out4) ; end; /
concerning
Kay -
How to run the procedure which parameter is in a single query
Hi all
Here's sinario
create or repalce procedure proc1 (number, number xyz, sys_refcursor Prefcur abc)
as
Start
...
......
... do something...
end;
front end, all paramertes came as string...
'proc1 (1,5,Prefcursor).
now what I do is that I created an another procedure that accept this string as parameter.
create or replace procedure proc2 (Vpstring varchar2, Prefcursor to sys_refcursor)
as
Start
execute Vpstring;
end;
but it gives me error
Please help me solve this problem.
any help appriciatedIt looks like a very strange requirement for me.
Try like this.
SQL> create or replace procedure p1(a1 number, a2 number, a3 out sys_refcursor) 2 as 3 begin 4 open a3 for select * from dual where a1 = a2; 5 end; 6 / Procedure created. SQL> create or replace procedure p2(str varchar2, rc out sys_refcursor) 2 as 3 lstr varchar2(100); 4 begin 5 lstr := 'BEGIN ' || substr(str,1,instr(str,',',1,2))||':1);' ||' END;'; 6 7 execute immediate lstr using rc; 8 end; 9 / Procedure created. SQL> var rc refcursor SQL> exec p2('p1(1,1,rc)',:rc) PL/SQL procedure successfully completed. SQL> print rc D - X SQL> exec p2('p1(1,2,rc)',:rc) PL/SQL procedure successfully completed. SQL> print rc no rows selected SQL>
Thank you
Knani. -
Run the statement in a stored procedure with Out parameters and
Hi all
I have a stored procedure that calls a select statement. Here it is...
CREATE OR REPLACE PROCEDURE BLABLA_VIEW_PROCEDURE
* (BLABLA_KEY IN NUMBER, *)
XML_OUTPUT ON VARCHAR)
AS
BEGIN
SELECT SYS. XMLTYPE.getStringVal (OBJECT_VALUE) in XML_OUTPUT FROM BLABLA_VIEW WHERE extractValue (OBJECT_VALUE, ' / BLABLA_TYPE/BLABLA_KEY ') = 2876;
END;
Is to have both IN and OUT parameters as described above. I am able to compile and run the procedure.
The problem I want to share with everyone is...
I want to run the stored procedure together with a single EXEC command.
I tried different ways using the EXEC command but of no use.
Could someone help me?
Thanks in advance.
Published by: user10763276 on June 3, 2010 15:47Please visit the following...
sudhakar@ORCL>CREATE OR REPLACE PROCEDURE BLABLA_VIEW_PROCEDURE 2 (BLABLA_KEY IN NUMBER, 3 XML_OUTPUT OUT VARCHAR) 4 AS 5 BEGIN 6 XML_OUTPUT := BLABLA_KEY || ' and whatever else...'; 7 END; 8 / Procedure created. sudhakar@ORCL> sudhakar@ORCL>var XML_OUTPPUT varchar2(100); sudhakar@ORCL>exec BLABLA_VIEW_PROCEDURE (9151, :XML_OUTPPUT); PL/SQL procedure successfully completed. sudhakar@ORCL>print XML_OUTPPUT; XML_OUTPPUT -------------------------------------------------------------------------------- 9151 and whatever else... sudhakar@ORCL>
Post tells you...
var OUTPUT VARCHAR exec BLABLA_VIEW_PROCEDURE (9151, :OUTPUT); print OUTPUT
VARCHAR is not a valid TYPe to declare. Use VARCHAR2 (nnn) where nnn is a number.
VR,
Sudhakar B.
Maybe you are looking for
-
The cutting of a legend against the axes in tiara 2011/2012
Hello until DIAdem 2010, it was possible to cut a legend in a report against the axes, but not against the chart.To do this, I had to create the layout in the DIAdem 8.1 set the clipping and then convert TDR LPD.As you can see below, the legend of ti
-
Connect to the HP ePrint Center
I tried to sign in or register and it won't let me exceed entered my information, it's broken?
-
full backup on a network drive
Having problems by performing a full backup using my network ethernet WD MybookLive drive. I have successfully done a backup of files, but if I try a complete backup network drive doesn't appear in the menu "on a hard drive' option drop-down list. Ho
-
Help. I have this hp pavilion dv6 bought in 2012 in Singapore. This laptop came with a pre-installed windows 7 Home premium 64-bit. Earlier this year, I got the free update of Windows 10 and I was happily obliged to update my windows 7 to windows 10.
-
My Extension of Ripple Chrome will not package or package &; sign
I will have questions my application of packaging. I put all the directories correctly. I have double and triple checked. Note that the package and the launch is not put in evidence and in the settings section, he finds no simulators even though I in