Sample using XMLTYPE out parameter
Hi, all
any full sample source code using ODP.NET and XMLTYPE out parameter?
PROCEDURE OBTENER_DATOS_DESPLIEGUE(pPROYECTO IN VARCHAR2,
pETIQUETA IN VARCHAR2 DEFAULT NULL,
pMOMENTO OUT TIMESTAMP,
pDATOS OUT XMLTYPE)
And for testing: function and procedure.
FUNCTION FRKDATA_GET_XMLTYPE(num IN NUMBER, xml1 IN XMLTYPE) RETURN XMLTYPE IS
xmlout XMLTYPE;
BEGIN
SELECT XMLTYPE_COL
INTO xmlout
FROM POC_TEST_XML_TABLE
WHERE NUM_COL = num;
RETURN xmlout;
END FRKDATA_GET_XMLTYPE;
PROCEDURE FRKDATA_TESTXML(qry in VARCHAR2, rslt OUT XMLTYPE) AS
BEGIN
rslt := dbms_xmlgen.getxmltype(qry);
END FRKDATA_TESTXML;
View in https://entlib.codeplex.com/discussions/454750
I get "connection is closed" errors
Only, I've found this sample, but without OUT parameters.
create or replace function xmlproc(v1 in xmltype) return xmltype is
begin
return v1;
end;
using System;
using System.Data;
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
class Program
static void Main(string[] args)
using (OracleConnection con = new OracleConnection())
con.ConnectionString = "user id=scott;password=tiger;data source=orcl";
con.Open();
using (OracleCommand cmd = new OracleCommand("",con))
cmd.CommandText = "xmlproc";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new OracleParameter("return", OracleDbType.XmlType)).Direction = ParameterDirection.ReturnValue;
cmd.Parameters.Add(new OracleParameter("v1", OracleDbType.XmlType)).Direction = ParameterDirection.Input;
cmd.Parameters["v1"].Value = "<a>b</a>";
cmd.ExecuteNonQuery();
Console.WriteLine(((OracleXmlType)cmd.Parameters["return"].Value).Value);
The below works for me.
PROCEDURE "XMLPROC" (
"PARAM1" OUT XMLTYPE) IS
BEGIN
PARAM1 := dbms_xmlgen.getxmltype('SELECT FIRST_NAME FROM EMPLOYEES WHERE EMPLOYEE_ID=100');
END;
OracleConnection con = new OracleConnection();
con.ConnectionString = conString;
con.Open();
OracleCommand cmd = con.CreateCommand();
cmd.CommandText = "xmlproc";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new OracleParameter("xmlout", OracleDbType.XmlType)).Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
Console.WriteLine(((OracleXmlType)cmd.Parameters["xmlout"].Value).Value);
Similar Messages
-
How to use the "out" parameter in idl
hello.idl:
module HelloApp
interface Hello
string sayHello();
void getPass(in string name,out string pass);
HelloServer:
public class HelloServer
class HelloServant extends _HelloImplBase
public void getPass(String name,org.omg.CORBA.StringHolder pass)
System.out.println("Server pass = " + pass);
if (name.equals("lxh"))
pass = new org.omg.CORBA.StringHolder("1234");
if (name.equals("cbj"))
pass = new org.omg.CORBA.StringHolder("5678");
HelloClient:
public class HelloClient
public static void main(String args[])
try{
org.omg.CORBA.StringHolder Pass = null;
if (args.length == 1)
System.out.println("Client pass = " + args[0]);
helloRef.getPass(args[0],Pass);
System.out.println(Pass);
} catch(Exception e) {
When I run client main method with parameter "lxh",I will get a error says the getPass() parameter which has given is wrong.
How to use the out parameter in client?Does this error only occurs if you pass "lxh" or always?
Did you try passing a StringHolder Object rather than a NULL Object?
Perhaps you can post the error message!? -
How to use the out parameter of a transformation
Hi All,
I have a requirement where I need to move all the transformations from process flows to map.SO for each transformation I need to have 1 map which calls this transformation.I have 1 transformation which has both input and output parameter.If I use this transformation in mapping then how to use the out parameter of thsi transformation.This out parameter needs to beused in other mappings.Can soemone please help me.
Thansk in advanceHi,
I'm not quite sure what you are trying to do.
What works: Connect the outgroup of a pre- or post-mapping process operator to the mapping output parameter operator..
What does not work: Connect the outgroup of an operator that can return more than one row (e.g. table operator, filter, joiner ,...) to the mapping output parameter operator. The mapping output parameter just returns "one row", like a pl/sql function call.
You cannot pass a "data stream" from one mapping to another. Maybe the pluggable mappings is what you are looking for.
Regards,
Carsten. -
How to declare procedure without using IN OUT parameter?
Hi:
I want to declare procedure without using IN OUT parameter.
My Script is:
DECLARE
procedure pro_bank_master() As
Declare
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
The Error i am receiving is:
Error starting at line 1 in command:
DECLARE
procedure pro_bank_master() As
Declare
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
Error report:
ORA-06550: line 8, column 27:
PLS-00103: Encountered the symbol ")" when expecting one of the following:
<an identifier> <a double-quoted delimited-identifier>
current
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Can any Body Help Me?
Thank YouDECLARE
procedure pro_bank_master As --also you should remove brackets when you are not using any parameters
----Declare-- *( declare should not be present in procedure declaration )*
kr_bankid integer;
last_bank_id number(10,0);
CURSOR comp_cur IS select bank_id,date_created,created_by,modified_by,name_en from COM_BANK_MASTER ;
comp_rec comp_cur%ROWTYPE;
BEGIN
OPEN comp_cur;
FETCH comp_cur INTO comp_rec;
WHILE comp_cur%FOUND
LOOP
kr_bankid:= comp_rec.bank_id;
insert into crayom_db.C_Bank(ad_client_id, ad_org_id, isactive, created, createdby, updated, updatedby, name, routingno, c_location_id, swiftcode, isownbank, description) values(11,11,'Y',sysdate,100,sysdate,11,comp_rec.name_en,'A',1000009,'A','Y','A');
select crayom_db.C_Bank.c_bank_id into last_bank_id from crayom_db.C_Bank where rownum=1 ORDER BY crayom_db.c_bank.c_bank_id DESC;
insert into crayom_db.CR_IdBackup values(kr_bankid, last_bank_id);
FETCH comp_cur INTO comp_rec;
End LOOP;
close comp_cur;
END;
BEGIN
pro_bank_master();
END;
Edited by: user11183973 on Sep 22, 2009 5:49 PM -
Using IN OUT parameter in procedures
Hello Experts ;
Good morning all;
i am trying to execute a program using procedure ( IN and IN OUT ) parameter.
i have a emp table i want to update perk column details.
>> Here is coding >>
1 create or replace procedure emp_salary
2 (id IN emp.eid%type , salary IN OUT emp.esalary%type) IS
3 tmp_sal number;
4 BEGIN
5 select esalary into tmp_sal from emp where eid=id;
6 if tmp_sal between 10000 and 20000 THEN
7 salary_inout := tmp_sal*1.2;
8 else if tmp_sal between 20001 and 29999 THEN
9 salary_inout := tmp_sal*1.8;
10 ELS IF tmp_sal > 30000 then
11 salary_inout := tmp_sal*2.0;
12* END;
SQL> /
Warning: Procedure created with compilation errors.
SQL> show errors;
Errors for PROCEDURE EMP_SALARY:
LINE/COL ERROR
10/5 PLS-00103: Encountered the symbol "IF" when expecting one of the
following: := . ( @ % ; The symbol ";" was substituted for "IF" to continue.
12/4 PLS-00103: Encountered the symbol ";" when expecting one of the
following: if
MY DB version is : 10.2.0.1
emp details :
SQL> select * from emp;
|EID | ENAME | EQUAL | ESALARY | ECITY | EPERK |
1 sona | mba | 10000 | ******** | |
2 maya | mca | 15000 | **********| |
3 sony | msc | 20000 | **** | |
4 King | m.s | 22000 | **********| |
5 ford | m.s | 40000 | **********| |
Thanks in advance ;Hello all ;
Thanks for all replies. I slightly modified my code because to understand without any doubt.
nothing , just removed salary_inout.
>> My table details >>
SQL> desc emp;
Name Null? Type
EID NUMBER
ENAME VARCHAR2(15)
EQUAL VARCHAR2(10)
ESALARY VARCHAR2(15)
ECITY VARCHAR2(15)
EPERK NUMBER
ECONTACT_NO NUMBER
>> Dummy Records >>
SQL> select * From emp;
EID ENAME EQUAL ESALARY ECITY EPERK
1 sona mba 10000 XXXXXX
2 maya mca 15000 XXXXXX
so , i want to create procedure to increment salary as per conditions.
SQL> create or replace procedure emp_salary
2 (id IN emp.eid%type ,
3 salary IN OUT emp.esalary%type ) IS
4 tmp_sal number;
5 BEGIN
6 select esalary into tmp_sal from emp where eid=id;
7 if tmp_sal between 10000 and 20000 THEN
8 salary := tmp_sal*1.2;
9 else if tmp_sal between 20001 and 29999 THEN
10 salary := tmp_sal*1.8;
11 ELSE IF tmp_sal > 30000 then
12 salary := tmp_sal*2.0;
13 END IF;
14 END IF;
15 END IF;
16 END;
17 /
Procedure created.
>> Here , i am getting error >>
SQL> execute emp_salary;
BEGIN emp_salary; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'EMP_SALARY'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
My DB version is : 10.2.0.1.0 on OEL 4.4 ( Personal database - for self studies).
I have some doubts please , please ......... clear my doubt !
1. when creating procedure for some columns from original table ,
- i always use following method .
local_vaibale_name <table_name>.<org_column_name>%type ; that is ,
id emp.eid%type; - then why i am getting error ?
Please find my error and help me to resolve it.
Thanks. -
Using the result of an OUT Parameter
Hi,
A little help?, I want to use the OUT parameter in another procedure, I can do it with a function but its bugging me what I'm doing wrong in the procedure.
I code compiles i.e.
PROCEDURE LOG_OUT(calc_id OUT NOCOPY VARCHAR2) AS
BEGIN
SELECT MAX(calculation_ID)
INTO calc_id
FROM AXMW_FA_TRX_DETAIL_BASE;
DBMS_OUTPUT.PUT_LINE('LOG Value Returned IS : '||calc_id ) ;
END;
But when I call this from another procedure as
v_log_name VARCHAR2(400);
v_log_name := Fnd_File.LOG_OUT;
The error is
PLS-00306: wrong number or types of arguments in call to 'LOG_OUT'
Is it something with bind variables
Thanks
QuertyTry
v_log_name := 'Fnd_File.LOG_OUT';Hey, what r u doing with above code?
You are assigning string value to a variable?
The compilation won't give any error.
And OP thinks it's solution!!!!!!!!!!!
LOL -
Return Nested Table Using Out Parameter
Hi Friends,
I wrote a function in which i'm using a return type as NUMBER and OUT parameter as TABLE but i'm not able to call the function in PL/SQL because of TABLE ,Can anyone plz tell me how to call the function in PL/sql using TABLE as OUT parameter. The calling function is mentioned below..
FUNCTION get_label_to_folder (
i_folder_id IN NUMBER,
i_label_id IN NUMBER,
i_new_path IN VARCHAR2,
i_src_path IN VARCHAR2 DEFAULT NULL,
--i_output_loc_type IN VARCHAR2,
o_vdoc_table OUT vdocs_table
RETURN NUMBER;
I tried to call that function in this manner but it won't work--
DECLARE
TYPE vdocs_table IS TABLE OF VARCHAR2 (50);
vdoc vdocs_array := vdocs_array ();
vret VARCHAR2 (20);
BEGIN
vret :=
sce_label_util.get_label_to_folder (32272,
324073,
'/test-aaaa/a1/',
NULL,
vdoc
FOR i IN vdoc.FIRST .. vdoc.LAST
LOOP
DBMS_OUTPUT.put_line (vret || ' ,' || vdoc (i));
END LOOP;
END;
Kindly check it and plz resolve the problem.
Regards,
AnandIt is not the correct approach to do this (passing a collection using an OUT parameter) using a function.
Does not matter whether you dislike it. It is still wrong.
It should be a procedure. It should likely define the OUT parameter as being passed by reference and not value in order to decrease the call overheads and increase performance.
Also note that is it not called a table. The correct terminology is a collection or an associative array. A table is something you get inside the database engine. The structure you define in the PL engine is nothing like a database table and everything like an array.
PS. And how do you expect us to determine the error? How do you expect us to test anything if we do not know what Oracle version you are using? Please.. FULL details, including Oracle version number and the full Oracle error message! -
How to use th out parameters?
Hi all,
I have the following code,
out_error:='';
proc_validatePriceRecord(pd_rec.product_name,pd_rec.product_id,pd_rec.market,out_error);
DBMS_OUTPUT.PUT_LINE(out_error);Is this the right way to use the out parameter?> Is this the right way to use the out parameter?
Most definitely not!
Errors must NOT be returned as an output parameter. AN ERROR MUST BE RAISED AS AN EXCEPTION.
This is a fundamental principle in today's programming languages.. from Delphi to Java to C# to whatever. -
Call Procedure with OUT Parameter
Hi,
When I use an Procedure that has an OUT Parameter
how can I use these OUT Parameter as an IN Parameter for an another Procedure.
thanks
MarcelNot sure, but is the following you after,
SQL> create or replace procedure p1_out (a out number)
2 as
3 begin
4 a := 10;
5 end;
6 /
Procedure created.
SQL> create or replace procedure p1_in (a in number)
2 as
3 begin
4 dbms_output.put_line(a);
5 end;
6 /
Procedure created.
SQL> declare
2 a number;
3 begin
4 p1_out(a);
5 p1_in(a);
6 end;
7 /
10
PL/SQL procedure successfully completed.
SQL> -
Can we use OUT or IN OUT parameter mode in function?
Can we use OUT or IN OUT parameter mode in function & if YES then what's limitations?
hi,
Yes we can have OUT and IN OUT parameters for a function.
As per my knowledge there are no limitations , but as per the convention we will use OUT ,IN OUT Parameter modes for only procedures .
Thanks,
P Prakash -
Calling a stored procedure with VARRAY as out parameter using JDBC
Hi,
I want to use the data type VARRAY as an out parameter in an Oracle stored procedure. I want to call the stored procedure from
my java program using JDBC.
I'm using Oracle 8.1.5 for Windows NT.
Please help me.
Thanks
Sumanta
nullOriginally posted by JDBC Development Team:
It's very similar to other datatype except that it uses OracleTypes.ARRAY typecode and the value is mapped to a oracle.sql.ARRAY instance. The code looks as follows --
cstmt.registerOutParameter (idx, OracleTypes.ARRAY, "VARRAY_TYPE_NAME_HERE");
cstmt.execute ();
ARRAY array = (ARRAY) cstmt.getObject (idx);
Thanks for your reply.
I have to use:-
OracleCallableStatement cs1 = (OracleCallableStatement )conn.prepareCall
( "{call proj_array(?)}" ) ;
for retrieving a collection as an OUT parameter.
This gives me the errors:-
C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Blob getBlob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
import java.sql.*;
^
C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Array getArray(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
import java.sql.*;
^
C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Clob getClob(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
import java.sql.*;
^
C:\jdbc\VarraySQL.java:0: The method oracle.jdbc2.Ref getRef(int) declared in class oracle.jdbc.driver.OracleCallableStatement cannot override the method of the same signature declared in interface java.sql.CallableStatement. They must have the same return type.
import java.sql.*;
^
How do I get rid of these errors?
null -
Reg: Need help to call a Stored Procedure - Out Parameter using DBAdapter
HI
I have created a procedure with Out Parameter, using DBAdapater i have invoked it. I have assigned the out parameter also. But while running i am getting this error.
My Procedure is shown below. It executes successfully when its run in database.
create or replace
PROCEDURE SP_QUERY(s_string in varchar2, retCodeString out varchar2)
AS
l_sql_stmt varchar2(1000);
BEGIN
l_sql_stmt := s_string;
EXECute immediate l_sql_stmt;
commit;
if SQLCODE = 0 then
retCodeString := 'OK';
end if;
END;
java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException:
Client received SOAP Fault from server : Exception occured when binding was invoked.
Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'ExecuteScript' failed due to:
Stored procedure invocation error. Error while trying to prepare and execute the SOADEMO.SP_QUERY API.
An error occurred while preparing and executing the SOADEMO.SP_QUERY API.
Cause: java.sql.SQLException: ORA-06550: line 1, column 15:
PLS-00904: insufficient privilege to access object SOADEMO.SP_QUERY ORA-06550: line 1, column 7:
PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API.
This exception is considered not retriable, likely due to a modelling mistake.
To classify it as retriable instead add property nonRetriableErrorCodes with value "-6550" to your deployment descriptor (i.e. weblogic-ra.xml).
To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff.
All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:808) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:384)
Please help me in this issue.Hi
Right now i geeting the below error
java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : oracle.fabric.common.FabricException:
oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist :
java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:808) at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:384)
at oracle.sysman.emas.view.wsmgt.WSView.invokeOperation(WSView.java:301) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.
invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.el.parser.AstValue.invoke(Unknown Source)
at com.sun.el.MethodExpressionImpl.invoke(Unknown Source) at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.
invoke(MethodExpressionMethodBinding.java:53) at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1256)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.
run(ContextSwitchingComponent.java:92) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.
UIXInclude.broadcast(UIXInclude.java:102) at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361) at oracle.adf.view.rich.component.
fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96) at oracle.adf.view.rich.component.fragment.UIXInclude.
broadcast(UIXInclude.java:96) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475) at javax.faces.component.UIViewRoot.
processApplication(UIViewRoot.java:756) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:889) at
oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:379) at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.
execute(LifecycleImpl.java:194) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265) at weblogic.servlet.internal.
StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.
invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.sysman.emSDK.license.LicenseFilter.doFilter(LicenseFilter.java:101) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271) at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177) at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.help.web.rich.OHWFilter.doFilter(Unknown Source) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.emas.fwk.MASConnectionFilter.doFilter(MASConnectionFilter.java:41) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.AuditServletFilter.doFilter(AuditServletFilter.java:179) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.EMRepLoginFilter.doFilter(EMRepLoginFilter.java:203) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.model.targetauth.EMLangPrefFilter.doFilter(EMLangPrefFilter.java:158) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.core.app.perf.PerfFilter.doFilter(PerfFilter.java:141) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.sysman.eml.app.ContextInitFilter.doFilter(ContextInitFilter.java:542) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119) at java.security.AccessController.doPrivileged(Native Method) at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315) at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442) at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103) at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171) at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209) at weblogic.work.ExecuteThread.run(ExecuteThread.java:178) Caused by: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Client received SOAP Fault from server : oracle.fabric.common.FabricException: oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist : java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:362) at oracle.sysman.emSDK.webservices.wsdlparser.OperationInfoImpl.invokeWithDispatch(OperationInfoImpl.java:1004) at oracle.sysman.emas.model.wsmgt.PortName.invokeOperation(PortName.java:750) at oracle.sysman.emas.model.wsmgt.WSTestModel.invokeOperation(WSTestModel.java:802) ... 79 more Caused by: oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : oracle.fabric.common.FabricException: oracle.fabric.common.FabricInvocationException: java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist : java.lang.RuntimeException: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1040) at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:826) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.synchronousInvocationWithRetry(OracleDispatchImpl.java:235) at oracle.j2ee.ws.client.jaxws.OracleDispatchImpl.invoke(OracleDispatchImpl.java:106) at oracle.sysman.emSDK.webservices.wsdlapi.dispatch.DispatchUtil.invoke(DispatchUtil.java:358) ... 82 more -
Forms hangs when using result of an OUT parameter to do an Insert
Hello,
I think I have slightly odd problem here... I'm currently migrating a Forms 6i client-server application to Forms 10g904. I found that one of my Forms was hanging i.e. screen goes blank, 'activity' bar on the bottom right just keeps whirring away indefinitely.
After much investigation, the hanging-form problem occurs in the following scenario:
- In a routine in a Forms pll library, a variable is declared e.g. w_capture_output
- In the first round of a loop, this variable is passed into a database stored proc, which has an OUT parameter to return a result e.g. SOME_PROC(w_some_input, w_capture_output);
- w_capture_output comes back with a value e.g. 'P'
- This is then used in an Insert e.g. INSERT INTO some_table (a, b) VALUES (1, w_capture_output)
- The next round of the loop; the variable is passed in again into the proc. It still holds the value from the last round e.g. 'P'
- In this round, the logic of the proc is such that the OUT argument is set to null i.e. when the proc has finished, w_capture_output is now null. This can be confirmed with IF w_capture_output IS NULL THEN display_some_message. The code is still all running fine.
- But now when I run INSERT INTO some_table (a, b) VALUES (2, w_capture_output) - the form hangs.
I can, however, work around this and prevent the form from hanging simply by ensuring at the start of each round of the loop that I explicitly set w_capture_output back to null before passing it into the proc that sets it. Or alternatively, after it comes back from the proc, the following also prevents the hanging problem:
w_capture_output := NVL(w_capture_output,NULL);
To summarise - if I pass a variable into a proc taking an OUT parameter, AND that variable is not null going into the proc, AND the proc sets it to null AND I then try to use that variable in an Insert statement - the form hangs. Something horrible is happening to the variable inside the procedure, I think.
Now, I can kind of see why passing a non-null variable into an OUT argument might cause problems (although only if you then try to set it to null - not if you set it to another, non-null value). However, exactly the same code works fine under Forms 6i, using the same database instance and proc. And if Oracle have changed the rules, shouldn't it throw an error, rather than just hanging? I'd prefer not to have to use the workaround, as this is a very large app and I don't know yet how many places would need it.
Has anyone else come across this issue..? (Database is 9.0.2. btw, Forms are 10g904)
Cheers,
JamesTry
v_log_name := 'Fnd_File.LOG_OUT';Hey, what r u doing with above code?
You are assigning string value to a variable?
The compilation won't give any error.
And OP thinks it's solution!!!!!!!!!!!
LOL -
Hi i want to use boolean type in a procedure as out parameter !!
Hi
I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
please HELP !!I need to use Boolean type as out parameter in my procedure which return true if the SELECT query in procedure returns any row otherwise it should return false
Sounds like basic PL/SQL stuff.
What problem are you experiencing?
Are you looking for something like this?
create or replace procedure check_emp (p_empno in number, p_result out boolean) is
dummy pls_integer;
begin
select 1
into dummy
from scott.emp
where empno = p_empno;
p_result := true;
exception
when no_data_found then
p_result := false;
end;
SQL> declare
2 emp_exists boolean;
3 begin
4 check_emp(7839, emp_exists);
5 if emp_exists then
6 dbms_output.put_line('Employee exists');
7 else
8 dbms_output.put_line('Employee does not exist');
9 end if;
10 end;
11 /
Employee exists
PL/SQL procedure successfully completed -
Do I use an IN OUT parameter procedure or what?
Hi,
I believe my logic is fine but my syntax and knowing when to use what smacks me.
I have 2 tables CLASSIFICATION and EMPLOYEE in a 1:M relationship.
Now I have to use a value in CLASSIFICATION called CLASSIFICATION.YEARLY_PAY to update my EMPLOYEE.PRO_RATA column in my EMPLOYEE table and I got stuck
See below:
CREATE TABLE CLASSIFICATION(
CLASS_ID VARCHAR2(6) NOT NULL,
CLASS_TYPE VARCHAR2(10),
DESCRIPTION VARCHAR2(30) NOT NULL,
YEARLY_PAY NUMBER(8),
HOURLY_RATE NUMBER,
WEEKDAY_OVER_TIME NUMBER,
WEEKEND_OVER_TIME NUMBER,
CONSTRAINT PK_CLASS_ID PRIMARY KEY (CLASS_ID));
INSERT INTO CLASSIFICATION VALUES('PR1','PERMANENT','MANAGER',45000,'','',NULL);
INSERT INTO CLASSIFICATION VALUES('PR2','PERMANENT','ADMIN ASSISTANT',22000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR3','PERMANENT','CONTROLLER',32000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR4','PERMANENT','CASH OFFICER',22000,'',1.5,NULL;
INSERT INTO CLASSIFICATION VALUES('PR5','PERMANENT','CLEANERS',16000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR6','PERMANENT','ADMIN OFFICER',22000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR7','PERMANENT','WAREHOUSE ATTENDANT',20000,''1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR8','PERMANENT','WINDOWS DRESSER',22000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('PR9','PERMANENT','DIRECTOR',60000,'','',NULL);
INSERT INTO CLASSIFICATION VALUES('PR10','PERMANENT','DEPUTY DIRECTOR',52000,'','',NULL);
INSERT INTO CLASSIFICATION VALUES('PR11','PERMANENT','SALES ASSISTANT',21000,'',1.5,NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP2','TEMP STAFF','ADMIN ASSISTANT','',16.50,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP3','TEMP STAFF','CONTROLLER','',29.00,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP4','TEMP STAFF','CASH OFFICER','',19.00,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP5','TEMP STAFF','CLEANERS','',10.00,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP6','TEMP STAFF','ADMIN OFFICER','',20.00,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP7','TEMP STAFF','WAREHOUSE ATTENDANT','',18.00,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP8','TEMP STAFF','WINDOWS DRESSER','',18.50,'',NULL);
INSERT INTO CLASSIFICATION VALUES('TEMP11','TEMP STAFF','SALES ASSISTANT','',16.00,'',NULL);
CREATE TABLE EMPLOYEE(
EMPID NUMBER(5) NOT NULL,
SURNAME VARCHAR2(30) NOT NULL,
FNAME VARCHAR2(30) NOT NULL,
GENDER CHAR(1) NOT NULL,
DOB DATE NOT NULL,
EMP_TYPE VARCHAR2(20) NOT NULL,
PRO_RATA_WAGES NUMBER(7,2),
ANNUAL_WEEKS_REQD NUMBER(2),
HOLIDAY_ENTLMENT NUMBER(2),
SICK_LEAVE_ENTLMENT NUMBER(2),
HIRE_DATE DATE NOT NULL,
END_DATE DATE,
ACCNO NUMBER(8) NOT NULL,
BANKNAME VARCHAR2(20) NOT NULL,
BRANCH VARCHAR2(20) NOT NULL,
ACCOUNTNAME VARCHAR2(20),
CLASS_ID VARCHAR2(6),
CONSTRAINT CK_HIRE_END CHECK (HIRE_DATE < END_DATE),
CONSTRAINT CK_HIRE_DOB CHECK (HIRE_DATE >= ADD_MONTHS(DOB, 12 * 18)),
CONSTRAINT CK_EMP_TYPE CHECK (EMP_TYPE IN ('FT','PT1','PT2','PT3','HOURLY')),
CONSTRAINT CK_EMP_GENDER CHECK (GENDER IN ('M','F')),
CONSTRAINT FK_EMP_CLASS FOREIGN KEY (CLASS_ID) REFERENCES CLASSIFICATION(CLASS_ID),
CONSTRAINT PK_EMP PRIMARY KEY (EMPID));
INSERT INTO EMPLOYEE VALUES(
SEQ_EMPID.NEXTVAL,'RICHARD','BRANDON','M','25-DEC-1966','FT',22000.00,52,28,14,'10-JAN-2005',NULL,90823227,'NATWEST','BROMLEY','DEPOSIT','PR2');
--record that needs updating to
INSERT INTO EMPLOYEE VALUES(
SEQ_EMPID.NEXTVAL,'BOYCE','CODD','M','15-JAN-1972','PT1','',39,'','','12-JAN-2005',NULL,72444091,'LLOYDS','KENT','CURRENT','PR8');
CREATE SEQUENCE SEQ_EMPID START WITH 1;
==========================================================
SQL> BEGIN
2 v_EMPID NUMBER(5);
3 V_CLASS_ID VARCHAR2(6);
4 V_YEARLY_PAY NUMBER(8);
5 SELECT SEQ_EMPID.CURRVAL INTO V_EMPID FROM DUAL;
6 SELECT b.CLASS_ID, b.YEARLY_PAY INTO V_CLASS_ID, V_YEARLY_PAY FROM CLASSIFICATION b WHERE b.CLA
SS_ID = V_CLASS_ID;
7 IF a.EMP_TYPE ='FT' THEN
8 UPDATE EMPLOYEE a SET a.ANNUAL_WEEKS_REQD = 52, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*52), a.HO
LIDAY_ENTLMENT=28, a.SICK_LEAVE_ENTLMENT = 14 WHERE a.EMPID
9 = V_EMPID;
10 ENDIF;
11 IF EMP_TYPE ='PT1' THEN
12 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 39, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*39), a.HOLIDA
Y_ENTLMENT=21, a.SICK_LEAVE_ENTLMENT = 10.5 WHERE a.EMPID =
13 V_EMPID;
14 ENDIF;
15 IF EMP_TYPE ='PT2' THEN
16 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 26, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*26), a.HOLIDA
Y_ENTLMENT=14, a.SICK_LEAVE_ENTLMENT = 7 WHERE a.EMPID =
17 V_EMPID;
18 ENDIF;
19 IF EMP_TYPE ='PT3' THEN
20 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 13, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*13), a.HOLIDA
Y_ENTLMENT=7, a.SICK_LEAVE_ENTLMENT = 3.5 WHERE a.EMPID =
21 V_EMPID;
22 IF EMP_TYPE ='HOURLY' THEN
23 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = NULL a.PRO_RATA_WAGES = NULL, a.HOLIDAY_ENTLMENT=NULL,
a.SICK_LEAVE_ENTLMENT = NULL WHERE a.EMPID = V_EMPID;
24 ELSE
25 RAISE_APPLICATION_ERROR(12101,'NO MATCHING RECORD EXIST YET');
26 ENDIF;
27 end;
28 /
v_EMPID NUMBER(5);
ERROR at line 2:
ORA-06550: line 2, column 9:
PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "NUMBER" to continue.
ORA-06550: line 3, column 12:
PLS-00103: Encountered the symbol "VARCHAR2" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "VARCHAR2" to continue.
ORA-06550: line 4, column 14:
PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following:
:= . ( @ % ;
The symbol ":=" was substituted for "NUMBER" to continue.
ORA-06550: line 23, column 46:
PLS-00103: Encountered the symbol "A" when expecting one of the following:
, * & - + ; / at mod rem return returning <an exponent (**)>
where ||
The symbol "," was substituted for "A" to continue.
ORA-06550: line 27, column 4:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
if
I tried an anonymous block first but did not work.
And how do i eventually execute this procedure anyway if not using it to update through a data entry form.
Much appreciation in advance
cube60Hi,
I have a longer code which I cut off at the top.
Anyway after execute your tip, here is the result. It looks alot better
SQL> declare
2 v_EMPID NUMBER(5);
3 V_CLASS_ID VARCHAR2(6);
4 V_YEARLY_PAY NUMBER(8);
5 begin
6 SELECT SEQ_EMPID.CURRVAL INTO V_EMPID FROM DUAL;
7 SELECT b.CLASS_ID, b.YEARLY_PAY INTO V_CLASS_ID, V_YEARLY_PAY FROM CLASSIFICATION b WHERE b.CLA
SS_ID = V_CLASS_ID;
8 IF a.EMP_TYPE ='FT' THEN
9 UPDATE EMPLOYEE a SET a.ANNUAL_WEEKS_REQD = 52, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*52), a.HO
LIDAY_ENTLMENT=28, a.SICK_LEAVE_ENTLMENT = 14 WHERE a.EMPID
10 = V_EMPID;
11 ENDIF;
12 IF EMP_TYPE ='PT1' THEN
13 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 39, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*39), a.HOLIDA
Y_ENTLMENT=21, a.SICK_LEAVE_ENTLMENT = 10.5 WHERE a.EMPID =
14 V_EMPID;
15 ENDIF;
16 IF EMP_TYPE ='PT2' THEN
17 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 26, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*26), a.HOLIDA
Y_ENTLMENT=14, a.SICK_LEAVE_ENTLMENT = 7 WHERE a.EMPID =
18 V_EMPID;
19 ENDIF;
20 IF EMP_TYPE ='PT3' THEN
21 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 13, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*13), a.HOLIDA
Y_ENTLMENT=7, a.SICK_LEAVE_ENTLMENT = 3.5 WHERE a.EMPID =
22 V_EMPID;
23 IF EMP_TYPE ='HOURLY' THEN
24 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = NULL a.PRO_RATA_WAGES = NULL, a.HOLIDAY_ENTLMENT=NULL,
a.SICK_LEAVE_ENTLMENT = NULL WHERE a.EMPID = V_EMPID;
25 ELSE
26 RAISE_APPLICATION_ERROR(12101,'NO MATCHING RECORD EXIST YET');
27 ENDIF;
28 end;
29 /
SELECT b.CLASS_ID, b.YEARLY_PAY INTO V_CLASS_ID, V_YEARLY_PAY FROM CLASSIFICATION b WHERE b.CLASS_ID
ERROR at line 7:
ORA-06550: line 24, column 46:
PL/SQL: ORA-00933: SQL command not properly ended
ORA-06550: line 24, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 28, column 4:
PLS-00103: Encountered the symbol ";" when expecting one of the following:
if
This was my original IN OUT parameter procedure
see result below:
SQL> CREATE OR REPLACE PROCEDURE UPDATE_EMPLOYEE(
2 EMPID IN NUMBER,
3 --SURNAME IN VARCHAR2,
4 --FNAME IN VARCHAR2,
5 --GENDER IN CHAR(1),
6 --DOB DATE NOT NULL,
7 EMP_TYPE IN VARCHAR2,
8 PRO_RATA_WAGES OUT NUMBER,
9 ANNUAL_WEEKS_REQD IN NUMBER,
10 HOLIDAY_ENTLMENT IN NUMBER,
11 SICK_LEAVE_ENTLMENT IN NUMBER,
12 HIRE_DATE IN DATE,
13 END_DATE IN DATE,
14 ACCNO IN NUMBER,
15 BANKNAME IN VARCHAR2,
16 BRANCH IN VARCHAR2,
17 ACCOUNTNAME IN VARCHAR2,
18 CLASS_ID IN VARCHAR2)
19 declare
20 v_EMPID NUMBER(5);
21 V_CLASS_ID VARCHAR2(6);
22 V_YEARLY_PAY NUMBER(8);
23 begin
24 SELECT SEQ_EMPID.CURRVAL INTO V_EMPID FROM DUAL;
25 SELECT b.CLASS_ID, b.YEARLY_PAY INTO V_CLASS_ID, V_YEARLY_PAY FROM CLASSIFICATION b WHERE b.CLA
SS_ID = V_CLASS_ID;
26 IF a.EMP_TYPE ='FT' THEN
27 UPDATE EMPLOYEE a SET a.ANNUAL_WEEKS_REQD = 52, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*52), a.HO
LIDAY_ENTLMENT=28, a.SICK_LEAVE_ENTLMENT = 14 WHERE a.EMPID
28 = V_EMPID;
29 ENDIF;
30 IF EMP_TYPE ='PT1' THEN
31 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 39, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*39), a.HOLIDA
Y_ENTLMENT=21, a.SICK_LEAVE_ENTLMENT = 10.5 WHERE a.EMPID =
32 V_EMPID;
33 ENDIF;
34 IF EMP_TYPE ='PT2' THEN
35 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 26, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*26), a.HOLIDA
Y_ENTLMENT=14, a.SICK_LEAVE_ENTLMENT = 7 WHERE a.EMPID =
36 V_EMPID;
37 ENDIF;
38 IF EMP_TYPE ='PT3' THEN
39 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = 13, a.PRO_RATA_WAGES = ((b.YEARLY_PAY/52)*13), a.HOLIDA
Y_ENTLMENT=7, a.SICK_LEAVE_ENTLMENT = 3.5 WHERE a.EMPID =
40 V_EMPID;
41 IF EMP_TYPE ='HOURLY' THEN
42 UPDATE EMPLOYEE SET ANNUAL_WEEKS_REQD = NULL a.PRO_RATA_WAGES = NULL, a.HOLIDAY_ENTLMENT=NULL,
a.SICK_LEAVE_ENTLMENT = NULL WHERE a.EMPID = V_EMPID;
43 ELSE
44 RAISE_APPLICATION_ERROR(12101,'NO MATCHING RECORD EXIST YET');
45 ENDIF;
46 end;
47 /
Warning: Procedure created with compilation errors.
SQL> show err;
Errors for PROCEDURE UPDATE_EMPLOYEE:
LINE/COL ERROR
19/1 PLS-00103: Encountered the symbol "DECLARE" when expecting one of
the following:
; is with authid as cluster order using external
deterministic parallel_enable pipelined
42/46 PLS-00103: Encountered the symbol "A" when expecting one of the
following:
, * & - + ; / at mod rem return returning <an exponent (**)>
where ||
The symbol "," was substituted for "A" to continue.
LINE/COL ERROR
46/4 PLS-00103: Encountered the symbol ";" when expecting one of the
following:
if
Much appreciation in advance
cube60
Maybe you are looking for
-
Show child levels when the top level is forced to be null - Avoid aggregations on the top level
Hi everybody, it was difficult to select a title for my question. Let´s say I have a geographical hierarchy with Region --> Country --> District --> Store levels I want to avoid the aggregations in local currency at the Region Level because that make
-
I have a new MacBook Air running Yosemite 10.10.1 with Quicktime 7 but would like to know if I can view my .mkv files on Quicktime 7 or are there any approved software I can run that's safe for Yosemite 10.10.1.
-
When I import the downloaded mp3 the title is very different and offensive words. What is up with this? thnx
-
Where to buy plastic caps for AC adapter plug?
I like the plastic caps that pop onto the connectors that plug directly into an iBook/Powerbook jack. I'll probably lose 'em, and I'd like to get replacement caps in bulk quantity (even a purchase of 100+ caps might be acceptable to me - I lose 'em T
-
IDSM-2 and VMS problem with version software
I use a IDSM-2 with software ver. 4... IDSM-2 is managing by VMS ver. 2.0. Since 2006 I couldn't taking new signature What can I do to upgrade IDSM to higher version ( IPS ver 5...) and which version VMS manage properly IDSM-2 with version software 5