Overloading in PL/SQL functions
Hi Guyz,I have 2 questions about overloading of functions.
(1) is it necessary for the functions within a package to run the overloading of functions?
(2) I have 2 functions: -.
(a) function check_hello (P_INPUT1 VARCHAR2, NUMBER P_INPUT2) RETURN BOOLEAN
(b) function check_hello (P_INPUT1 VARCHAR2, NUMBER P_INPUT2) RETURN VARCHAR2
The difference is the return type. I don't think this is possible since the signing of the arguments are the same. I just need to confirm that this is not possible.
Thank you.
Hello
user3913664 wrote:
Hi Guyz,I have 2 questions about overloading of functions.
(1) is it necessary for the functions within a package to run the overloading of functions?
Yes; the autonomous functions cannot be overloaded.
(2) I have 2 functions: -.
(a) function check_hello (P_INPUT1 VARCHAR2, NUMBER P_INPUT2) RETURN BOOLEAN
(b) function check_hello (P_INPUT1 VARCHAR2, NUMBER P_INPUT2) RETURN VARCHAR2
The difference is the return type. I don't think this is possible since the signing of the arguments are the same. I just need to confirm that this is not possible.
Exactly. How could you, the system or anyone else to choose one to use?
Give them different names, or add another argument if you really want that they have the same name.
Tags: Database
Similar Questions
-
PL/SQL functions as LOV to use in another display object
Hello
We had a custom search to extract data from a display object and the data displayed as a Table of ADF. Now, there are few requests for searches on this report. Go see criteria and Panel request if we allow saved search. But the fields used in the research are going through a lot of logic and thus the PL/SQL functions are implemented. We used to call these functions and lists separated by commas and then divided the list into individual elements and put in the component "select options".
The value (String) returned by the pl/sql function is something like - APAC, EMEA, NORTH AMERICA, FDA
I am creating a LOV based on SQL-query "Select getRegions() from dual;
Now, I want the list separated by commas to divide so that I could use this LOV in an another view and try the display criteria and saved searches.
I tried to assign as LOV just to check and the criteria drop-down view for region displays same value as single element - "APAC, EMEA, NORTH AMERICA, LAD."
I want it to be 4 separate - elements
APAC
EMEA
NORTH AMERICA
DVL
Is there anyway to achieve this?
Or better is at - it another way to do this (maybe I'm wrong)
Thank you.
JDev: 11.1.2.4
Instead of a programmatic VO of PL/SQL, I found sometimes easier to write PL/SQL functions that return a table - need to CREATE a TYPE for the data items to be returned and a TYPE of TABLE IMBRIQUE tabular form of the first kind. The function returns the type of table, and can even be a PIPElined table function. Then I create a VO with the following text:
SELECT * from TABLE (my_function_returning_table)
The function can even take parameters, which you fill with variable BIND your VO.
-
ORA-06503: PL/SQL: function returned no value ORA-06512:
Hi all
SQL > set serveroutput on
SQL > CREATE OR replace FUNCTION qty_value (p_item_id number)
2 RETURN NUMBER
3 EAST
4 v_qty_arrival NUMBER;
5 BEGIN
6. SELECT THE CASE SENSITIVE OPTION
7. WHAT (SUM (b.quantity) - SUM (b.quantity_received)) < = 0 THEN 0
8 ELSE (SUM (b.quantity) - SUM (b.quantity_received))
9 END Qty_Arrival
10 INTO v_qty_arrival
Po_lines_all 11 a,
po_line_locations_all 12 b
13 WHERE a.po_line_id = b.po_line_id
14 AND a.item_id = p_item_id;
15 EXCEPTION
16 THEN THAN OTHERS THEN
17 v_qty_arrival: = NULL;
18 RETURN v_qty_arrival;
19 END qty_value;
20.
The function is created.
SQL >
SQL > select xxc_qty_arrivale (214960) double
2.
Select xxc_qty_arrivale (214960) double
*
ERROR on line 1:
ORA-06503: PL/SQL: function returned no value
ORA-06512: at the 'APPS '. XXC_QTY_ARRIVALE', line 19
Back AFTER using the exception block is fine as long as your code actually REACHED the exception block.
When there are no errors, then your code will not enter the exception block, but you still NEED to return a value, since it is what functions a function wants to return a value, that's what the functions are made for.
Spot the differences between the following 3 functions. Understand how they work.
The first function has only a return in the exception block but runs correctly. Result: error, because the back is missing in the code block.
The second function has a return in the exception block and one in the block of code and runs correctly. Result: no error, because the return is not missing in the code block.
The third function has a return in the exception block and one in the block of code and is forced into an error. Result: no error, because the return of the exception handler is used (instead of retriggering of the error, which you would normally do).
SQL > create or replace function myfunc
2 return number
3 as
4 start
5 dbms_output.put_line ('in the section of code');
6 null;
7 exception
8 then than others
9. can
10 dbms_output.put_line (' in the exception handler ' |) SQLERRM);
11 --
12 return 0;
13 --
14 end;
15.
The function is created.
SQL > select double myfunc;
Select double myfunc
*
ERROR on line 1:
ORA-06503: PL/SQL: function returned no value
ORA-06512: at "GHPLUS. MYFUNC", line 14
In the section of code
SQL > create or replace function myfunc
2 return number
3 as
4 start
5 dbms_output.put_line ('in the section of code');
6 null;
7 --
8 return 1;
9 --
10 exceptional
11 so that others
12. can
13 dbms_output.put_line (' in the exception handler ' |) SQLERRM);
14 --
15 return 0;
16 --
end 17;
18.
The function is created.
SQL > select double myfunc;
MYFUNC
----------
1
1 selected line.
In the section of code
SQL > create or replace function myfunc
2 return number
3 as
n number 4;
5. start
6 dbms_output.put_line ('in the section of code');
7 n: = 1/0; -force an error (zero divisor) to join the exception handler
8 --
9 return 1;
10-
exception 11
12 so that others
13. can
14 dbms_output.put_line (' in the exception handler ' |) SQLERRM);
15 --
16 return 0;
17 --
18 end;
19.
The function is created.
SQL > select double myfunc;
MYFUNC
----------
0
1 selected line.
In the section of code
In the handler for exception ORA-01476: divisor is equal to zero
SQL >
-
PL/SQL function to calculate the non-working days
Hello
I have the following pl/sql function which generates a number of days between two selected dates (i.e. excluding weekends). However, I also need to exclude specific holidays - day of Christmas etc. These holiday dates are stored in a table in our database (11 GR 2) called "HOLIDAY".
How can I integrate the holidays which is held in the table of holidays in the following query to exclude these dates as well? I know how to write a separate funtion pl/sql for a number of days between two dates using SELECT... BUT I can't work out how to bring together them in a single query.
Could someone show me how with the pl/sql / dates below please?
Example of HOLIDAY table below.
Thank you!
TP
create or replace function WORKING_DAYS (pi_start_date in date, pi_end_date in date) return integer is v_start_date date :=pi_start_date; v_end_date date:=pi_end_date; v_count integer:=0; begin while v_start_date <= v_end_date loop if to_char(v_start_date,'D') not in ('6','7') then v_count := v_count+1; end if; v_start_date:=v_start_date+1; end loop; return v_count; end;
(select '10-Apr-2013' as NWD from dual union all select '06-May-2013' from dual union all select '27-May-2013' from dual union all select '26-Aug-2013' from dual union all select '26-Dec-2013' from dual union all select '25-Dec-2013' from dual union all select '01-Jan-2014' from dual union all select '18-Apr-2014' from dual union all select '21-Apr-2014' from dual union all select '05-May-2014' from dual union all select '26-May-2014' from dual union all select '25-Aug-2014' from dual union all select '25-Dec-2014' from dual union all select '26-Dec-2014' from dual) HOLIDAYS
Hello
the link is on MOSC, not OTN... Here's a copy:
This function calculates the number of days between two dates, ignoring weekends and holidays (if requested and if the holidays are stored in a table)
I give an example of table 'public_holiday' with sample data, but users must ensure that their table contains the relevant data (all holidays within the maximum range of use of the service)
CREATE TABLE public_holiday (calendar_day, DATE, text VARCHAR2 (30));
FUNCTION to CREATE or REPLACE nb_days (p_date_from IN DATE
p_date_to DATE by DEFAULT TRUNC (sysdate)
, p_public_holidays in CHAR DEFAULT 'Y '.
) RETURN NUMBER
DEFINE AUTHID
AS
/*********************************************************************/
/ * Author: Bruno Vroman * /.
/ * Created: 23-AUG-2012 * /.
/ * Last updated: 23-AUG-2012 * /.
/ * Object: to calculate the number of days between 2 dates, to the exclusion of * /.
/ * Saturday and Sunday, but also "holidays" If the * /.
/ * argument 'p_public_holidays' = 'Y ' * /.
/ * Support: p_date_from<= p_date_to ="">=>
/ * component ' hour min dry "ignored (just counting days) * /.
/* First step: */
/ * the calendar days between 2 days * /.
/ Remove 2 days for each "week" and 0 or 1 extra day * /.
/ * function to a condition "complex" mix day of first week * /.
/ * and the number of days when full remaining weeks are removed * /.
/ * (set up once for all, for example if there is 3 days and the * /)
(/ * first day is a Thursday, there is 1 "Sat/Sun" to subtract) * /.
/ * Second step: If 'p_public_holidays' = 'Y': other * /.
/ * days, do not count holidays. */
/ Holiday everyday are defined in a table "public_holiday" * /.
/ * Note: there may be holidays defined on Saturday/Sunday. */
/*********************************************************************/
l_result NUMBER;
l_from DATE;
l_to DATE;
l_case tank (4);
BEGIN
l_from: = TRUNC (p_date_from);
l_to: = TRUNC (p_date_to);
l_case: = TO_CHAR (l_from, 'Dy', 'NLS_DATE_LANGUAGE = English').
To_char (MOD (l_to - l_from + 1, 7));
l_result: = l_to - l_from + 1
-TRUNC ((l_to-l_from + 1) / 7) * 2
-CASE
WHEN l_case IN ('Mon6', 'Tue5', 'Wed4', 'Thu3', 'Fri2'
, "Sat1", "Sun1", "Sun2', 'Sun3", "Sun4".
, "Sun5', 'Sun6.
)
THEN 1
WHEN l_case IN ('Tue6', 'Wed5', 'Wed6', 'Thu4', "Thu5"
, 'Thu6', 'Fri3', 'Fri4', 'Fri5', 'Fri6 '.
, "Sat2", "Sat3', 'Sat4', 'Sat5", "Sat6.
)
THEN 2
0 OTHERWISE
END
;
IF SUPERIOR (p_public_holidays) = "Y".
THEN
SELECT l_result - COUNT (*)
IN l_result
OF public_holiday p
WHERE p.calendar_day > = l_from
AND p.calendar_day<=>=>
AND SUBSTR (TO_CHAR (p.calendar_day
, "Dy".
'NLS_DATE_LANGUAGE = English'
)
, 1, 1 ) != 'S'
;
END IF;
RETURN l_result;
EXCEPTION
WHILE OTHERS
THEN
DBMS_OUTPUT. Put_line (' CTF nb_days (' |))
To_char (p_date_from, "MON-DD-YYYY"). ', ' ||
To_char (p_date_to, "MON-DD-YYYY"). ', ' ||
p_public_holidays | ' ) : ' || SQLERRM
);
LIFT;
END nb_days;
/
REM
REM example:
REM A) fill out the 'public_holidays '.
REM
TRUNCATE TABLE public_holiday;
INSERT INTO public_holiday VALUES (DATE ' 2012-01-01', ' new year (a Sunday)');
INSERT INTO public_holiday VALUES (DATE '' 2012-01-03, "for example");
REM (insert other days...)
COMMIT;
Call the function for some pairs of dates of REM B)
REM nb1: remove only Sat/Sun
REM nb2: also remove holidays
REM
ALTER SESSION SET nls_date_format ='Dy DD-MON-YY';
WITH some_dates AS
(SELECT DATE ' 2011-12-29'd dual FROM
UNION ALL SELECT DATE ' 2012-01-08' FROM dual
UNION ALL SELECT DATE ' 2012-01-10' FROM dual
)
SELECT d1.d 'FROM '.
, d2.d ' to THE '.
, nb_days (d1.d, d2.d, ' don't) nb1
, nb_days (d1.d, d2.d, 'Y') nb2
OF some_dates d1
some_dates d2
WHERE d1.d<=>=>
ORDER BY nb1, nb2, d1.d
;
GO TO NB1 NB2
------------- ------------- ---- ----
Monday, January 8, 12 Monday, January 8, 12 0 0
Friday, December 29, 11 Friday, December 29, 11 1 1
Wednesday, January 10, 12 Wednesday, January 10, 12 1 1
Monday, January 8, 12 Wednesday, January 10, 12 2 2
Friday, December 29, 11 Monday, January 8, 12 7 6
Friday, December 29, 11 Wednesday, January 10, 12 9 8
Hope that this could be useful, but note that this code has not been completely tested, so check and test before you trust it (in the case of any questions, please post a comment)
Bruno Vroman.
Best regards
Bruno
-
Hi all
I have a table which includes
ID, first_name, last name and date of birth
I want to retrieve all the records that have the same name and DOB
for example.
ID, first_name, last name, DOB
1 xyz abc 01/01/2012
hij 2 efg 15/05/2012
3 xyz abc 01/01/2012
4 xyz abc 01/01/2012
so in the output of 1, 3 and 4 rows will appear only.
can someone advise please on the appropriate SQL function
Thanks in advance
Hello
One way is to use the analytical COUNT function:
WITH got_num_rows AS
(
SELECT id, first_name, last_name, dob
, COUNT (*) OVER (PARTITION BY first name
last_name
, dob
) AS num_rows
FROM table_x
)
SELECT id, first_name, last_name, dob
OF got_num_rows
WHERE num_rows > 1
;
The subquery is needed here, because the analytical functions are calculated after the WHERE clause has been applied. To use the results of an anlytic function in a WHERE clause, you must calculate the function in a subquery, then you can use the results where you want (including the WHERE clause) of a Super query.
-
BEEP 10 g call a PL SQL function
Hello..
It's really breaking the feet... googled a lot but always back to square start.
... Well guys want to help me...
I need to call a function from PL SQL BI editor passing 3 parameters.
that means this feature is... it feeds a table.
And the editor of BI report is read from the populated table...
Kindly help me out here... How can I start...
PL SQL function is a stand-alone... It is not under any procedure/package...
If you could give me some small excerpts of what to write in the style of data... that would be great... and Yes, indeed, this is the old version of the BEEP... 30%>
Total Questions: 11 (10 open)
>
Why can't anyone help you?>
He throws me an error
Variable binding does not existany work arounds guy?
>
soand in z_report_sys_op_test_pkg.z_report_sys_op_test get the necessary value
>
substr (: Store, 0, InStr(:Store,'-') - 1). -
Hello
In a query XQuery is posssible to call a function or procedure SQL (PL / SQL)?
Here is an example of what I had accomplished:
SELECT THE PRD. XMLCOLUMN of
XMLTABLE (' for $i in ora: view("P_iXXX")/LINE)
$j in ora: view("P_jXXX")/LINE.
where
($i / NSU_xxx = $j/NSU_xxx)
return
(
< NCL >
{
$i / NSU_xxx,
H3. CALL the SQL function? as sql_xxx
for $k in ora: view("P_kxxx")/ROW
($vk/COD_RMP_VPM = "PRD")
Return()
}
< / NCL >
() "PATH of XMLType 'XMLCOLUMN' COLUMNS 'resultsqlfunction' INTEGER PATH 'xsql_xxx' INTEGER ACCESS to 'NSU_xxx' path 'NSU_xxx', '.') as the PRD;
Thanks in advance for your answers
FrançoisWho today replaces "ora: see?
On 11.2, ora expansion feature: view() is deprecated in favor of the fn:collection("oradb:/") method:
http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_xquery.htm#BABECFFD
My DBA database have installed Oracle XML DB to use the XMLType and XMLTable, I thought that these features among other things speed up the creation of XML.
What are the benefits of using XQuery and XMLTable and XMLQUERY functions?
Which version of the database you use?
Please read: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_xquery.htm#CBAGCBGJ
Is there another method to expedite the creation of XML?
Publication of SQL/XML functions are probably the best way to create custom relational data XML documents.
The basic functionality of XQuery is not to the RDBMS query tables or views, although Oracle provides extensions to do.
Most of the time, I use XQuery (via XMLTable and XMLQuery) to do exactly the opposite, i.e. to extract XML data in a relational form, or the transformation of XML fragments.If your actual requests are slow - even if you need to define what that means and that you are pregnant - then maybe the SQL/XML functions are not the real problem.
In a "Where clause" as I turn, I have several "outer join". Here is an example.
where
PPM. NSU_PPM = w.NSU_PPM and FRNS. NSU_FRN (+) IS FCO. NSU_FRN and FCO. NSU_FCO (+) IS PPM. NSU_FCO
and T2O. NSQ_T2O (+) IS PPM. NSQ_T2O
and T51. NSQ_T51 (+) IS PPM. NSQ_T51
and TWU. NSU_STT (+) IS PPM. NSU_STT
and T01. NSQ_T01 (+) IS PPM. NSQ_T01
and vpm.cod_rmp_vpm (+) = "PRA".
and vpm.num_vsn_vpm (+) = PPM.vsn_sup
and w.nsu_ppm = A.nsu_ppm (+)
and W.NSU_SOO = A_HEADER. NSU_SOO and A_HEADER. NOR_SOM = 0Yes, it's exactly what I was talking about.
Transposing the logic for XQuery 1.0 is not the approach more simple (to say the least), because there is no direct support OUTER JOIN.
XQuery 3.0 provides the functionality, but it is not yet here in the database.My suggestion would be to stick to the publication of SQL/XML functions.
If you have a specific question about the performance, we (as the members of the forum) will be happy to help you.
Provides the steps necessary to reproduce the problem, including some examples of data.Kind regards
Marc.
-
No support for oracle sql functions
Hi all
Please can someone explain why the B-tree indexes are not capable of supporting SQL queries using the built-in functions of Oracle.
We have indexes of tree b on account_no column.
Select * from test_table where account_no = 11005208
the above query use the index on account_no
Select * from test_table where superior (account_no) = 11005208
But this query does not use the index on the account_no, going for the full table scan.
My question here is account_no is the numeric data type.
Then, there is no difference between the data in the columns account_no and upper (account_no) column data, so why he does not use index when using sql functions in an sql query?Hello
If you apply the upper function, Oracle implicitly converts its argument to a string, so your query is actually upper (to_char (account_no)).
There is none HAVE fully functional in the optimizer and you do not expect to know everything and do all the conclusions that a human being can do. Why should Oracle re - write this type of query analysis the data type of the columns and features when it seems more natural programmer write a correct query (without capital letters in this example) or, if necessary, create an index based on a function? -
Pass a list of values to a pl/sql function
I would like to pass a list of values to a pl/sql function where the list will be used in an IN clause. Ideally, I would like to do the following:
CREATE or REPLACE FUNCTION (dept_list in varchar2)
Start
Select... where dept in (dept_list);
use: process_list ('7730,7735,7740,7745');
I can't find an example to do based on pl/sql, but it seems feasible.
Is there a way to do this?user12088323 wrote:
I would like to pass a list of values to a pl/sql function where the list will be used in an IN clause.
use: process_list ('7730,7735,7740,7745');
The first thing is that you need an appropriate data type for storing a list of numbers. A unique value that look you like a list of numbers, is not actually a list of numbers but a single character value.
This example uses the built in odcinumberlist data type in a procedure, you can do the same in function
Re: Pass an array to an Oracle stored procedure
If you have an older version of the database, you may need to create your own type with the same definition of odcinumberlist.
-
Analyze: Body of PL/SQL function returning a SQL query
I need to get the final SQL returned by the PL/SQL function.
I'll use this final SQL in a procedure.
Please provide only a few tips on how to get the SQL code. I already looked in the DBMS_SQL package, but I don't know if this is the right place to look.
Kind regards
Sumitdeclare l2 varchar2(2000); begin l2:= 'Select NAME,ORIGINATED,OWNER,ORIGINATOR,'; l2:= l2 || 'DESIGNATED_UNIT,SOURCE,'; l2:= l2 || 'REFERENCE'; l2:= l2 || ' from MV_DETAILED_DATA'; /* Copy dynamic query SQL to application item for later use. */ :app_item := l2; wwv_flow.debug('l2: ' || l2); return l2; end;
I always use a call of debugging in the region of body of the PL/SQL function returning a SQL query sources so the real generated SQL can be quickly entered via the debug mode.
-
How to call the pl/sql function in application of the ADF
Hi Experts,
I need to call the pl/sql function in application of ADF, I have logic written in my AM
Method:
public String reportStoredProcedure (locationID customerID, number,
String tailNum) {}
CallableStatement st = null;
String v_sanctioned = null;
If (locationID! = null & & customerID! = null & & tailNum! = null) {}
System.out.println (locationID + "" + customerID + "" + tailNum);
Tail string = "TAIL";
String result = "N";
try {}
String stmt =
"start XXWFS_SANCTIONS_PKG. CHECK_SANCTION(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11); end; « ;
St = getDBTransaction () .createCallableStatement (stmt, 0);
st.setNull (1, Types.VARCHAR);
st.setNull (2, Types.NUMERIC);
st.setObject (3, customerID);
st.setNull (4, Types.NUMERIC);
st.setNull (5, Types.NUMERIC);
st.setObject (6, locationID);
st.setNull (7, Types.NUMERIC);
st.setNull (8, Types.NUMERIC);
st.setObject (9, tail);
st.setObject (10, tailNum);
st.setObject (11, result);
St.Execute ();
System.out.println ("v_sanctioned in AM:" + v_sanctioned);
} catch (Exception e) {}
e.printStackTrace ();
return "N";
} {Finally
If (st! = null)
try {}
St.Close ();
} catch (Exception e1) {}
E1. PrintStackTrace();
return "N";
}
}
} else {}
System.out.println ("v_sanctioned is null");
v_sanctioned = "N";
}
Return v_sanctioned;
}
Error:
java.sql.SQLException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in the call to 'CHECK_SANCTION '.
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1035)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:950)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1224)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3386)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3487)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3858)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:99)
at model.view.CardAMImpl.reportStoredProcedure(CardAMImpl.java:182)
at com.emboss.bean.ReadyToPrint.invokeVSanctioned(ReadyToPrint.java:485)
at com.emboss.bean.ReadyToPrint.PrintingCards(ReadyToPrint.java:434)
at com.emboss.bean.ReadyToPrint.printCards(ReadyToPrint.java:204)
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(AstValue.java:157)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1259)
at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:148)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:97)
to oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$ 1.run(ContextSwitchingComponent.java:90)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:309)
at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:94)
at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:91)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:812)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:292)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:177)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
to 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.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
to org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$ FilterListChain.doFilter (TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
to oracle.security.jps.ee.http.JpsAbsFilter$ 1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged (Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:414)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
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)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.doIt (WebAppServletContext.java:3684)
to weblogic.servlet.internal.WebAppServletContext$ ServletInvocationAction.run (WebAppServletContext.java:3650)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Can someone help me how to call...Call it in function, not as a procedure you do
try { String stmt = "begin :1 := XXWFS_SANCTIONS_PKG.CHECK_SANCTION(:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12); end;"; st = getDBTransaction().createCallableStatement(stmt, 0); st.registerOutParameter(1, Types.VARCHAR); st.setNull(2, Types.VARCHAR); st.setNull(3, Types.NUMERIC); st.setObject(4, customerID); st.setNull(5, Types.NUMERIC); st.setNull(6, Types.NUMERIC); st.setObject(7, locationID); st.setNull(8, Types.NUMERIC); st.setNull(9, Types.NUMERIC); st.setObject(10, tail); st.setObject(11, tailNum); st.setObject(12, result); st.execute();
= st.getString(1); -
Action dynamic pl/sql function setvalue
Hello
I have a table of currency with Exchange rate column.
I've created a form that allow the user to select the currency of the table and enter the rate elements of page Px_RATE.
I want to implement using dynamic action in the apex 4
Please help me on this case
Thanks and greetingsHello
You can do this by defining a dynamic action as follows...
#1-do a right click on the item page to select the currency (let's call it P1_CURRENCY for this example) and select 'create the dynamic Action '.
#2-Select 'Advanced' that we use the type of dynamic action "set the value, which is not available in the 'Standard' of the Assistant branch.
#3-name your dynamic action, say "RATE of GETTING", click on "next".
#4-let the "When" default attributes, it simply defines that the dynamic action is triggered whenever the currency item, click 'next '.
#5-pour the "real Action > Action' select 'Put the value'"
#6-think if you want to set the value on the loading of the page of the dynamic action too, if so let the 'Fire when loading the Page' box checked.
#7 [assuming that you have a simple API of PL/SQL that returns the rate of say get_rate, for example] select 'Set Type' of the 'body of the PL/SQL function.
#8-pour "Body of the PL/SQL function" says something like:
return get_rate(:P1_CURRENCY);
#9 "Page to submit elements", specify the element to P1_CURRENCY currency, and then click "next".
#10-pour "items affected" specify "Item" and then select the page element where you want to return the value of the rate, say P1_RATE.
#11-click on 'create '.
Let me know if it works for you or if you have other questions.
Kind regards
Anthony. -
assign a value to a text element using the PL/SQL function body
Hello
I want to assign a value to a text element using PL/SQL function body option in the Source elements. But the below error when I try to apply it.
Source code:
declare
name varchar2 (100);
Start
If v ("P3_CREHIDD") = 'Edit' then
Select ename in the name of cpy_emp where empno = v('P3_EMPNO2');
end if;
end;
ERR-1904 unable to calculate the default item: type = computation_type = function body declare name varchar2 (100); so start v ('P3_CREHIDD') = 'Edit' and then select ename in the name of cpy_emp where empno = v('P3_EMPNO2'); end if; end;.
Thank you
David.Hello
Your body of the function doesn't return anything.
Maybe it worksdeclare l_name varchar2(100); begin if v('P3_CREHIDD') = 'Edit' then select ename into l_name from cpy_emp where empno = v('P3_EMPNO2'); end if; RETURN l_name; end;
BR, Jari
-
call the XMLQuery pl sql function
Hi all.
Is anyone know how to call the function sql pl by XMLQuery query?
For example:
I pl sql function "test()".
And the desire to write this way:
Select XMLQuery (' let $t = test()' returning content);
How to change to work?
Thanks for all the answers.
Kind regards
Anton.following should give you an idea:
SQL> select xmlquery(('if (2*2 = ' || power(2,2) || ') then 1 else ()') returning content) x from dual X ----- 1 1 row selected.
-
Allowing access only through a PL/SQL function
What is the technique of letting a user to do something by a PL/SQL function that would normally not have the privilege to do so, without granting the possibility to do outside the PL/SQL function?
I have a need to allow a user to change the global_name of the database, in the resolution of ORA-02082 errors. In short, the product using Oracle (we can not change code) loopback database links, and the only way to drop them (according to the Oracle support) is to temporarily change the global_name, drop the link and change the global_name return.
This happens on a semi-regular basis, so rather than having to involve a DBA, I favor.
My thought was to create a PL/SQL procedure that performs the Rename/move/rename. I don't want the user to be able to change the global_name of DB to what he wants, but I want him to have the possibility to change through the PL/SQL procedure at will.
My question is, how to do this without allowing the user to update on sys.global_name?
Let's see:
(1) create a role (say LOOPBACK_DBLINK_DROPPER)
(2) create a procedure (say LOOPBACK_DBLINK_DROP) makes the Rename/move/rename
(3) grant and then execute the procedure to the role
(4) ??? .. .the I need to give an update on sys.global_name for the role. But if I then assign the role to a user, is not that means he can also update sys.global_name on its own without using the procedure, because it would have the sys.global_name privilege update?Create the schema belonged procedure that has the necessary privileges.
GRANT EXECUTE on LOOPBACK_DBLINK_DROP to NON_PRIV_USERThat's all!
Maybe you are looking for
-
replacements, I do not know how to do
I don't know how to replace the ink cartridges. Help
-
When starting my computer from the menu start opens and a series of * appear in the search box. This has happened regularly starting for the last 2 weeks. I have run virus and spyware scans but nothing was found. It causes the start menu to be useles
-
HP Laserjet Pro 400: Printing problems HP Laserjet Pro 400
I installed a new toner cartridge. It worked very well for a few days and now, on the side of the page it prints, it leaves a trail of ink through the page also spaced points. I tried the cleaning function and print out a few pages to see if it goe
-
Is there a recovery for an Acer C720P image, or should I use the 720 recovery image?
I would like to create a USB stick recovery, but am unable to find an image for my Acer C720P. May then jeutiliser the 720 generic write on the USB recovery image I want to use for the recovery / emergency purposes? Any help apreciated.
-
BlackBerry 8330 smartphones crashes!
Model Curve 8330 OS 4.5 updates all were updated I don't know the file size, memory.etc because I can't activate it. Battery pull didn't work not many tries - when I try explained below. Charge it every night, the battery is usually up to 50 - 60% at