Problem with writing a procedure with table name as an input parameter
Hi all,
I am writing a procedure with table name as an input parameter:
below is the code
create or replace procedure prc(in_tbl in varchar2)
as
begin
execute immediate ' truncate table tlb ';
insert into tbl
select a,b,c from in_tbl;
end;
user579585 wrote:
Hi all,
I am writing a procedure with table name as an input parameter:
below is the code
create or replace procedure prc(in_tbl in varchar2)
as
begin
execute immediate ' truncate table tlb ';
insert into tbl
select a,b,c from in_tbl;
end;You'll also need to use dynamic sql for the insert:
execute immediate 'begin insert into tbl select a,b,c from '||in_tbl||'; end';
Similar Messages
-
How to find the interface with the help of target table name
Hi friends,
Whether with the help of target table name, is it possible to find the interface name that invokes this target table in ODI 11.1.1.7.
Thanks in advance.
Regards,
Sarohighlight the datastore in the navigator, expand its sub tree, there is a 'populated by' node, under the node, it will list all datastores which are used as sources to the current datastore
then expand 'used by'->interfaces, it will show all interfaces which include current datastore(but maybe current datastore is used as source)
that's all you can get from UI, otherwise I suppose you can use SDK. -
Display the part of table tree based on input parameter
Hi,
I have the use case where I have to display the tree table based on the input parameter.This input parameter will display the displaying the node of tree which are under the given input node id.
so If given node id is 10 then we should to display the node which are under 10.rest should not get displayed.
Can you tell me how it can be achieved using ADF.
I am using jdev 11.
Thanks,
HarshThis depends on how you apply the VC to the VO at runtime. Easiest way to accomplish this would be to create a VO in the data model of the application module which you edit in the data model to already having the vc applied to.
In your region you can then drag the 'executeWithParameters' method onto the task flow and make it the default activity. Here you map the input parameter of hte task flow to the parameter needed for the executeWithParameter.
For hte method you get a binding like
<action IterBinding="EmployeesByNameIterator" id="ExecuteWithParams" RequiresUpdateModel="true" Action="executeWithParams">
<NamedData NDName="bindLastName" NDValue="#{pageFlowScope.pname}" NDType="java.lang.String"/>
</action>
NDValue="#{pageFlowScope.pname}"
is the inputParameter from the region (or task flow).
Timo -
Db Adapter: problems by calling a procedure with type as parameter
Hi,
We using a db adapter in a bpel process.
In that dapter we call a procedure with types as in and out parameter
package.procedure(p_in IN in_t, p_rsult OUT result_t).
When we calling the procedure, we don't call the procedure directly.
We call that procedure in a schema who have the execute rigths for the package and the types.
When we run the process we get the error message
unable to convert the xsd element p_in whose user defined type is in_t
cause: java.sql.SQLException: ora-01436 connect by loop in user data
I am not shore if I draw the right conclusions.
Is it rigth that bpel have a problem by using types as parameter when using two schematas? Isn't it a bug.
For every help I was thankful.
Thanks in advanced.
MichaelHi,
thanks for the hint. I have implemented a wrapper package and it's working well.
Only one crux. The parameter of the called procedure are data types and not simple types.
CREATE OR REPLACE TYPE pesa_db_return_t AS OBJECT
(SUCCESS_MSG varchar2(255)
,FAULT_SQLCODE varchar2(255)
,FAULT_SQLMSG varchar2(255)
Wrapper package...
IS
PROCEDURE prc_writeReOinDB (p_AuftragRechnungOnline IN pesa_data.pesa_tivu_reo_t
,p_result OUT pesa_data.pesa_db_return_t)
IS
BEGIN
pkg_pesa_reo.prc_writeReOinDB (p_AuftragRechnungOnline => p_AuftragRechnungOnline
,p_result => p_result
END prc_writeReOinDB;
END pkg_pesa_wrapper;
So I have to declare the parameter with the schema user in front of.
Now, we have deployed thes sources on a second enviroment and get following error:
<2008-04-22 15:01:25,749> <ERROR> <eweber.collaxa.cube.engine.dispatch> <BaseScheduledWorker::process> Failed to handle dispatch message ... exception ORABPEL-05002
Message handle error.
An exception occurred while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.CallbackDeliveryMessage"; the exception is: Type class not found.
Cannot find class for type "org.apache.xerces.dom.ElementNSImpl". Please check that the class is located in the classpath.
You have a hint for me what I have to do?
Thanks in advanced,
Michael -
Problem to call stored procedure with several IN pars and single REF Cursor
Hi,
Oracle 9.2.0.1
Ole DB Provider I've got with ODP 9.2.0.4
First I try to call packaged procedure with single
REF CURSOR - it works fine(PROCEDURE getDep(dep OUT DEPART.refcur) IS ...).
When I try to call procedure with additional IN parameter, I get an error ORA-01008: not all variables bound.
Packaged procedure: PROCEDURE getDep(dep OUT DEPART.refcur, i1 IN number) IS .... and so on.
Try to call from C#:
cmd.CommandText = "{call depart.getDep(?)}";
OleDbParameter par0 = cmd.CreateParameter();
par0.Value = some value;
par0.DbType = DbType.Int16;
par0.OleDbType = OleDbType.Integer;
par0.Direction = ParameterDirection.Input;
OleDbDataAdapter da = new OleDbDataAdapter(cmd.CommandText,con);
DataSet ds = new DataSet();
da.Fill(ds);
Connection string:
"Provider=OraOLEDB.Oracle;User Id=scott;Password=tiger;Data Source=ora92;OLEDB.NET=true;PLSQLRSet=true"
Please, HELP !
Thanks in advance,
VyacheslavHi,
Are you using OLEDB.NET driver (System.Data.Oledb) or ODP.NET driver (Oracle.DataAccess)?
If you are using ODP.NET, remember that you need to bind the refcursor output variable also (besides the numbder)
Arnold -
Problem in the output when the table name is explicitly assigned.
hi
Am using a procedure to copy the information's in a table to a flat file. my aim is to achieve this copy function by assigning the table name from user explicitly.
this is the program:
create or replace procedure jk(table_name in varchar2) is
sel_table varchar2(30);
l_bool BOOLEAN;
irows INTEGER := 1;
buffer LONG;
f utl_file.file_type;
BEGIN
sel_table:='select * from '||table_name;
f := utl_file.fopen('SAMPLE','tablename.txt','W');
OWA.cgi_var_name (1) := 1;
OWA.cgi_var_val (1) := 1;
OWA.init_cgi_env (1, OWA.cgi_var_name, OWA.cgi_var_val);
HTP.adddefaulthtmlhdr (FALSE);
l_bool :=
OWA_UTIL.tableprint (ctable => sel_table,
cattributes => '',
ntable_type => OWA_UTIL.pre_table,
ccolumns => '*',
cclauses => '',
ccol_aliases => '',
nrow_min => 0,
nrow_max => 500
WHILE (irows != 0)
LOOP
buffer := HTP.get_line (irows);
utl_file.put_line(f,buffer);
/* do whatever you like with the contents of the buffer */
/* You may write to a file or simply print it out */
DBMS_OUTPUT.put_line (buffer);
END LOOP;
END;
the error during execution:
SQL> @for.sql
Procedure created.
SQL> exec jk('CUST');
BEGIN jk('CUST'); END;
ERROR at line 1:
ORA-00931: missing identifier
ORA-06512: at "SYS.DBMS_UTILITY", line 125
ORA-06512: at line 2
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1120
ORA-06512: at "SYS.DBMS_SQL", line 323
ORA-06512: at "SYS.OWA_UTIL", line 595
ORA-06512: at "SYS.OWA_UTIL", line 689
ORA-06512: at "SYS.OWA_UTIL", line 1222
ORA-06512: at "XMLUSER.JK", line 14
ORA-06512: at line 1
thanks in advance
karthik.JYou better don't supply the whole select statement to OWA_UTIL.tableprint but only the table name!
-
Need help with writing a query with dynamic FROM clause
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'Simply sticking the later query in the first query does not work.
Any pointers will be appreciated.
Thanks
rogers42Hi,
rogers42 wrote:
Hi Folks,
I need help with an query that should generate the "FROM" clause dynamically.
My main query is as follows
select DT_SKEY, count(*)
from *???*
where DT_SKEY between 20110601 and 20110719
group by DT_SKEY
having count(*) = 0
order by 1; The "from" clause of the above query should be generated as below
select 'Schema_Name'||'.'||TABLE_NAME
from dba_tables
where OWNER = 'Schema_Name'
Remember that anything inside quotes is case-sensitive. Is the owner really "Schema_Name" with a capital S and a capital N, and 8 lower-case letters?
Simply sticking the later query in the first query does not work.Right; the table name must be given when you compile the query. It's not an expression that you can generate in the query itself.
Any pointers will be appreciated.In SQL*Plus, you can do something like the query bleow.
Say you want to count the rows in scott.emp, but you're not certain that the name is emp; it could be emp_2011 or emp_august, or anything else that starts with e. (And the name could change every day, so you can't just look it up now and hard-code it in a query that you want to run in the future.)
Typically, how dynamic SQL works is that some code (such as a preliminary query) gets some of the information you need to write the query first, and you use that information in a SQL statement that is compiled and run after that. For example:
-- Preliminary Query:
COLUMN my_table_name_col NEW_VALUE my_table_name
SELECT table_name AS my_table_name_col
FROM all_tables
WHERE owner = 'SCOTT'
AND table_name LIKE 'E%';
-- Main Query:
SELECT COUNT (*) AS cnt
FROM scott.&my_table_name
;This assumes that the preliminary query will find exactly one row; that is, it assumes that SCOTT has exactly one table whose name starts with E. Could you have 0 tables in the schema, or more than 1? If so, what results would you want? Give a concrete example, preferably suing commonly available tables (like those in the SCOTT schema) so that the poepl who want to help you can re-create the problem and test their ideas.
Edited by: Frank Kulash on Aug 11, 2011 2:30 PM -
Define variable a ROWTYPE based on a table name passed as a parameter
I am trying to write a procedure that processes rows for tables of differing structures. Table_name is passed as an IN parameter to the procedure. I define a cursor within the function that is defined by a SELECT * FROM table_name. I also need to define two variables, l_this_row and l_prev_row. I need to define them as table_name%ROWTYPE. Of course, table_name is a VARCHAR2 that contains the name of a table, whereas Oracle is expecting an actual table name in the declaration. How can I define these variables to make something like the code shown below compile and work properly? I am using Oracle 10gR2.
DEFINE PROCEDURE foo(table_name IN VARCHAR2) IS
l_this_row table_name%ROWTYPE;
l_prev_row table_name%ROWTYPE;
l_cursor SYSREFCURSOR;
BEGIN
OPEN l_cursor FOR
'SELECT * FROM '
|| table_name
|| ' ORDER BY '
|| get_pk_col_name_for_table(table_name)
|| ', version_num'; --version_num is guaranteed to be a valid column name in every table, although the other column names vary in name, quantity, and type per table.
LOOP
FETCH l_cursor INTO l_this_record;
EXIT WHEN l_cursor%NOTFOUND;
-- dynamic comparison of l_this_record and l_prev_record and conditional processing based on the comparison occurs here
l_prev_record := l_this_record;
END LOOP;
END;Billy Verreynne wrote:
Well, one method is to keep the SQL projection consistent across the number of dynamic SQLs being dealt with. With the projection being consistent, your code does not need to guess what the row structure the column returns.Unfortunately, what I need to compare is almost everything except the primary keys. So one table might contain addresses and another might contain invoice headers. There's no way to get them into the same structure.
Billy Verreynne wrote:
This approach can also be done in a generic fashion - dealing with an arbitrary number of columns per row. This dynamic structure is more flexible, but also increases the complexity of the code that has to deal with this. For example:
create or replace type TStrings is table of varchar2(4000);Now SQLs can be created to pass any number of columns to the code to process:
select TStrings( empid, ename, jobid, date_employed, date_of_birth ) from emp order by empidThe code then uses the Count method of the TStrings type to determine the number of columns passed and processes that.Then the problem becomes having to specify all the column names. I need to figure them out dynamically, as in "SELECT column_name FROM user_tab_cols WHERE column_name NOT IN ('ID', 'PREV_ID', 'NEXT_ID')". It would, of course, be best if I didn't have to populate each array element with an individual SELECT in its own EXECUTE IMMEDIATE statement. That would certainly slow things down. If I were trying to write this using ADO.NET, I could reference something like table_name(row_index).columns(ix) without having to know any of the column names, and I could exclude columns by name using a reference like table_name.columns(column_index).name. (I don't recall the exact syntax, but it is something reasonably close to that.) But PL/SQL doesn't seem to have anything close to this.
Ideally, I want to get it to where I can do something like this in a private function:
FOR ix IN 1..TStrings.Count LOOP
IF this_row(ix) <> last_row(ix) THEN
RETURN FALSE;
END IF;
END LOOP;
RETURN TRUE;
Billy Verreynne wrote:Last comment. I have to echo what the others said. This is not optimal. Dealing with variant/dynamic structures and processing rows using PL/SQL (in a slow-by-slow fashion) does not scale well. Scalability and performance comes from processing data sets using SQL.I completely understand. I'm a big fan of replacing a lot of code with one SQL statement, but that just won't work for this problem. -
Is it possible to pass table type values as input parameter for con prg?
Hi All,
Could you please confirm that is it possible to pass table type value as input to concurrent program?
If possible how to achive this?
If not possible whether we have any ora doc which is confirming this.
Any hel will be great.
Thanks,Hi student;
Please check (http://apps2fusion.com/at/45-as/241-enablingdisabling-concurrent-program-parameters)
Hope it helps
Regard
Helios -
The problem with writing BLOB arrays in table at one time?
i want to write many blobs in at one time , And i use the OCIBindArrayOfStruct()
My code is blow, I want you guys to help me find my BUG, thank you very much.
the Program always pops the ERROR message :ORA-22275: invalid LOB locator specified
STATUS status;
OCILobLocator **lArray;
lArray = new OCILobLocator*[nCount];
for (size_t i = 0;i < nCount;i++)
if((status = OCIDescriptorAlloc((dvoid *)env->envhp,(dvoid **)&lArray,
(ub4)OCI_DTYPE_LOB,(size_t)0,(dvoid **)0)) != OCI_SUCCESS)
return(status);
text sqlstats[300];
strcpy_s((char*)sqlstats,300,"insert into ");
strcat_s((char*)sqlstats,300,texTableName);
strcat_s((char*)sqlstats,300,"(TEXID,TEXNAME,TEXDATA) values (:texid,:texname,:lblob)");
OCIBind bndhp1 = (OCIBind )0;
OCIBind bndhp2 = (OCIBind )0;
OCIBind bndhp3 = (OCIBind )0;
PREPARE_RETURN(sqlstats);
BIND_CTR(bndhp1,":texid",texinfo[0].texid,30);
if ((status = OCIBindArrayOfStruct(bndhp1,env->errhp,nSize,sizeof(sb2),sizeof(ub2),sizeof(ub2))) != OCI_SUCCESS)
for(size_t j = 0;j < nCount;j++)
FREE_LOB_LOCATOR(lArray[j]);
delete[] texinfo;
char err[512];
OraError_Proc(status,err,512);
AfxMessageBox(err);
return status;
BIND_CTR(bndhp2,":texname",texinfo[0].texname,MAX_NAME);
if ((status = OCIBindArrayOfStruct(bndhp2,env->errhp,nSize,sizeof(sb2),sizeof(ub2),sizeof(ub2))) != OCI_SUCCESS)
for(size_t j = 0;j < nCount;j++)
FREE_LOB_LOCATOR(lArray[j]);
delete[] texinfo;
char err[512];
OraError_Proc(status,err,512);
AfxMessageBox(err);
return status;
if((status = OCIBindByName(env->stmthp,&bndhp3,env->errhp,
(CONST text *)":lblob",(sb4)-1,(dvoid *)lArray,(sword)-1,SQLT_BLOB,
(dvoid *)0,(ub2 *)0,(ub2 *)0,(ub4)0,(ub4 *)0,OCI_DEFAULT)) != OCI_SUCCESS)
return(status);
if ((status = OCIBindArrayOfStruct(bndhp4,env->errhp,sizeof(lArray[0]),sizeof(sb2),sizeof(ub2),sizeof(ub2))) != OCI_SUCCESS)
for(size_t j = 0;j < nCount;j++)
FREE_LOB_LOCATOR(lArray[j]);
delete[] texinfo;
char err[512];
OraError_Proc(status,err,512);
AfxMessageBox(err);
return status;
//this line will not succeed
if((status = OCIStmtExecute(env->svchp,env->stmthp,env->errhp,
(ub4)nCount,(ub4)0,(CONST OCISnapshot *)0,(OCISnapshot *)0,(ub4)OCI_DEFAULT)) != OCI_SUCCESS)
char err[512];
OraError_Proc(status,err,512);
AfxMessageBox(err);
for(size_t j = 0;j < nCount;j++)
FREE_LOB_LOCATOR(lArray[j]);
delete[] texinfo;
return status;[Edit : oops...misread the post...]
Regards -
Writing procedure using table name as parameter
I want to write a procedure to sample size any table. It could be employees, departments, etc. It will not know anything about the table (what table, columns, datatypes) until it is called.
I want to invoke it sample_size(table_name_in, table_name_out, sample_sz).
Table_out will be created and empty. It will determine the columns to be selected from table_in.
It is a given that all columns in table_out exist in table_in with same name/datatypes.
Pseudocoding:
determine increment using size of table_in and sample_sz
build out_var list from table_out
select out_list from table_in
for (rows in table_in) loop by increment
insert into table_out
end for
I wrote function to get cursor:
create or replace
FUNCTION get_cursor
(table_nm IN VARCHAR2,
flds IN VARCHAR2)
RETURN sys_refcursor
IS
cur sys_refcursor;
vQry VARCHAR2(4000);
BEGIN
vQry := 'SELECT ' || flds || ' FROM ' || table_nm;
OPEN cur FOR vQry;
RETURN cur;
END get_cursor;
What I cannot figure out is how to define rowtype in calling procedure:
PROCEDURE
sample_size( table_in IN VARCHAR2,
table_out IN VARCHAR2,
sample_sz IN NUMBER )
IS
c1 sys_refcursor;
vInto VARCHAR2(4000);
BEGIN
-- code to get variables desired into variable vInto (I know how to do this)
c1 := get_cursor(table_in,vInto);
LOOP
FETCH c1;
EXIT WHEN c1%NOTFOUND;
-- code to decide wether to insert row into table_out
END LOOP;
CLOSE c1;
END sample_size;
I get error on FETCH c1; line:
Error(47,15): PLS-00103: Encountered the symbol ";" when expecting one of the following: . into bulk
All discussions I found about subject will have something similar to:
Rec emp%rowtype
and then
fetch c1 into Rec
None of the discussions showed me how to process an unknown table.
If tomorrow someone tells me to sample_size table CITIES, I want to use function without having to change it.
This is my first post. I hope I gave enough information. Thanks for any answer.Welcome to the forum.
If yours is not an exercise why you don't want to use just
<tt><b>[url http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10002.htm#SQLRF01702]select * from table_name {sample_clause}</b></tt> ;)
Regards
Etbin -
Problem Calling MaxDB stored procedure with output from MII Query template
Hi,
I am using Max DB Database studio to write stored procedure, I am calling stored procedure from MII Query using CALL statement.
Can anyone guide me how to pass output values of stored procedure.
Examlpe::
call ProcName('[Param.1]','[Param.2]','[Param.3]','[Param.4]','[Param.5]', :isSuccess, :Trace)
In the above line of code I am not able to get the output values of stored procedure that is isSuccess and Trace values in Query template when executed. But same thing I get when executed in Database studio.
How do I call with outputs for any stored procedure in MII.
Any help would be appriciated.
Thanks,
PadmaMy call statement is like this
call RESULTDATA_INSERT('[Param.1]','[Param.2]','[Param.3]', :isSuccess, :Trace)
I am able to insert record in DB, But I am not getting output values in Query template.I have done this in Fixed Query, when I execute it throws me "Fatal error as Loaded content empty".
I tried giving select below call but it dont work.
Regards,
Rao -
I have around 990 databases on a single SQL server in which I want to rename two tables 'AuditEvent' and 'AuditPropertyEvent' to 'AuditEvent_Archive' and AuditPropertyEvent_Archive table.
Then I want to transfer lastest 6 months of data from now newly rename archived tables to New created Auditevent tables (Which will have same structure as old),
For doing it I tried Cursor and SP_msforeachdb as possible solutions but its not allowing me to execute 2 sp_rename statements with go inside a dynamic statement.
Please suggest any possible solutions on how to rename the 2 tables in all databases using sp_msforeachdb or cursor in a single go.exec sp_msforeachdb '
USE [?]
IF EXISTS (SELECT 1 FROM ?.INFORMATION_SCHEMA.TABLES WHER TABLE_NAME = ''AuditEvent'')
EXEC sp_rename ''AuditEvent'',''AuditEvent_Archive''
IF EXISTS (SELECT 1 FROM ?.INFORMATION_SCHEMA.TABLES WHER TABLE_NAME = ''AuditPropertyEvent'')
EXEC sp_rename ''AuditPropertyEvent'',''AuditPropertyEvent_Archive''
SELECT *
INTO AuditEvent
FROM AuditEvent_Archive
WHERE datecolumn>dateadd(month,-6,getdate())
SELECT *
INTO AuditPropertyEvent
FROM AuditPropertyEvent_Archive
WHERE datecolumn >dateadd(month,-6,getdate())
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
Cast a Input Parameter of Table Type?
Hi,
Can a stored procedure input parameter of type
TYPE T_INV_ID IS TABLE OF INV.INV_ID%TYPE INDEX BY PLS_INTEGER;
PROCEDURE P_LIST_INV(CP_INV_ID IN T_INV_ID , C_REF OUT T_CURSOR)
be used as with the Table Function?
i.e. Select * from TABLE(CP_INV_ID)
Thanks,
VictorYes you can. You will have to use execute immediate (or dbms_sql, depending on your database version).
You will have to attach the table name into the rest of the sql string (you can't use bind variables for the table name). The owner of the procedure must have the appropriate rights on the given table, or the procedure must use invoker rights (authid current_user)
execute immediate: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/10_dynam.htm
dbms_sql: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_sql.htm#998100
invoker rights: http://download-uk.oracle.com/docs/cd/A87860_01/doc/appdev.817/a77069/07_subs.htm#12848
greetings
Freek D
HI all,
I want write a common stored procedure which will perform some specified tasks on specified table. The table name is passing as a input parameter of a stored procedure. Can we use the table name as a input parameter of a stored procedure?
Please reply
BR -
Oracle Stored Procedure with out parameter
Good morning,
Is it possible to use an Oracle stored procedure with out parameters in MII ?
If yes, what is the manipulation to see the values of parameters Out?
Thank youMichael,
This is the MII query template :
DECLARE
STRCOMPTERENDU NVARCHAR2(200);
BEGIN
STRCOMPTERENDU := NULL;
XMII.SP_VALIDATEPROCESSORDERSLIST2 ( STRCOMPTERENDU => [Param.1] );
COMMIT;
END;
and the stocked procedure code
CREATE OR REPLACE PROCEDURE XMII.SP_ValidateProcessOrdersList2(strCompteRendu OUT nVarchar2) IS
tmpVar NUMBER;
debugmode INT;
strClauseSql varchar(2048);
strListPOactif varchar(1024);
dtmTimeStamp DATE;
NAME: SP_ValidateProcessOrdersList
PURPOSE:
REVISIONS:
Ver Date Author Description
1.0 18/06/2008 1. Created this procedure.
NOTES:
Automatically available Auto Replace Keywords:
Object Name: SP_ValidateProcessOrdersList
Sysdate: 18/06/2008
Date and Time: 18/06/2008, 18:45:32, and 18/06/2008 18:45:32
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
BEGIN
tmpVar := 0;
debugmode := 0;
-- lecture date systeme pour time stamp
select sysdate into dtmTimeStamp from dual;
if debugmode = 1 then
DBMS_OUTPUT.put_line('SP_ValidateProcessOrdersList');
end if;
-- insertion du bloc dans le log
insert into LOG_ORDER
(DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
values
(dtmTimeStamp,'SP_ValidateProcessOrdersList',ID_LOG_ORDER.nextval);
Commit;
if debugmode = 1 then
DBMS_OUTPUT.put_line('insertion LOG OK');
end if;
strCompteRendu := '0123456-896;0123456-897';
commit;
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
ROLLBACK;
-- insertion du bloc dans le log
insert into LOG_ORDER
(DATE_ORDER,BLOCK_ORDER,ID_LOG_ORDER)
values
(dtmTimeStamp,' ',ID_LOG_ORDER.nextval);
COMMIT;
-- Consider logging the error and then re-raise
RAISE;
END SP_ValidateProcessOrdersList2;
Thanks for your help
Alexandre
Maybe you are looking for
-
When I attempt to go to msn, it takes me there but won't open the page
when I attempt to go to msn to my hotmail account, msn appears in the address box, but the page won't open
-
How to select a row for update values, Using CTEs or suitable method
HI All, I have a table as claim_data as below. claim_id amount change_monthkey created_monthkey ord 54511 300 201304 201304 1 54511 0 201305
-
I have downloaded some presets from a cool website, and in Beta versions they showed up in the preset window. But now , with 1.0, they are not showing at all. I have quit twice but to no avail. Did Adobe change where the presets go?
-
[SOLVED] Can somebody explain how to connect with BitlBee to Jabber?
I've read archwiki about bitlbee ssh and irssi setup, but still can't connect. So what I do, as soon as I start "irssi" I enter "/connect im.bitlbee.org", then "/join #bitlbee", then I get into a chatscreen, where I should enter "help commands" or "h
-
LMS 3.1 Device Discovery
Hi, Having had a fully operational version of Ciscoworks on a very old server we were advised to move it to a virtual server, with a new IP address. Unfortunately since then the device discovery is not collecting data on all devices on our network, a