How to start the view off of the ref cursor Oracle as input/output param
Hello world
We use JDev 11.1.2.3 WL 10.3.6 and Java 7.
We are at the beginning of our transition from Oracle Forms to ADF. We have a very large forms that uses many store procedures that have IN/OUT ref Cursor parameters and tables plsql. I tried to find information on best practices to achieve, but only seemed to find tutorials on SEO of the Oracle ref Cursor return functions. I hope we don't have to rewrite our code of database to work with ADF.
This is an example of a proc currently a block on a form based on directly
The ref cursor parameter is input/output to satisfy the way the form handles this type of paradigm.
ADF we want I hope to reuse these procs existing (without the need to wrap/overload them) on the basis of the display objects.
Example:
/ * my record type which houses the information I want to go back * /.
TYPE rec_hist_vacpac_status IS RECORD)
rec_order NUMBER (5),
rec_rownum NUMBER (5),
return_column SAM_VACPAC.vacpac_status%TYPE,
rec_login_id SAM_VACPAC.ins_user%TYPE,
status_date SAM_VACPAC.status_date%TYPE
);
/ * Sets the ref cursor type * /.
TYPE lcur_hist_vacpac_status IS REF CURSOR;
/ * This is a procedure that would take some info link go / return
Return the ref cursor of this information as an in / out * /.
PROCEDURE prc_myinfo_refcur)
pnum_identify_seq_id in NUMBERS
pcur_myinfo IN OUT lcur_hist_vacpac_status);
Can anyone point me in the right direction on documentation on this?
Thank you!
Hi Cemerson:
See this example:
- 1. create a TYPE as an object
CREATE OR REPLACE
TYPE GOTYOB_EQUI
AS AN OBJECT
(
CDELEM VARCHAR2 (50).
TIELEM VARCHAR2 (2)
);
- 2. create a TABLE TYPE AS
CREATE OR REPLACE
TYPE GOTYTA_EQUI
AS THE GOTYOB_EQUI TABLE;
- 3 create a function, it returns the TYPE of the TABLE
FUNCTION fn_equiposarriba)
pa_cdelem IN VARCHAR2,
pa_nucomp in NUMBERS
pa_anperi in NUMBERS
pa_meperi in NUMBERS
)
Gotyta_equi RETURN PIPELINED IS
CURSOR trae_equimani (va_cdelem VARCHAR2) IS
SELECT cdelem, tielem, cdelempadr,
(SELECT cdequi
Of evm_alim
WHERE anperi = eq.anperi
AND meperi = eq.meperi
AND nucomp = eq.nucomp
AND cdalim = eq.cdalim) cdalim
Of evm_equimani eq
WHERE anperi = pa_anperi
AND meperi = pa_meperi
AND nucomp = pa_nucomp
AND cdelem = va_cdelem
AND cdelempadr <> cdelem
AND tielem <> 'A ';
equimani trae_equimani % ROWTYPE;
va_cdalim VARCHAR2 (100);
BEGIN
-Loading los equipos aguas arriba
WHILE equimani.cdelempadr IS NOT NULL LOOP
OPEN trae_equimani (equimani.cdelempadr);
equimani: = NULL;
SEEK trae_equimani INTO equimani;
CLOSE Trae_equimani;
IF equimani.cdelem IS NOT NULL THEN
PIPE ROW (gotyob_equi (equimani.cdelem, equimani.tielem));
END IF;
END LOOP;
RETURN;
END;
- 4 SQL Query with the help of the function... you can use this SQL in a display object
SELECT
*
Of
TABLE (gopq_eventos.fn_equiposarriba (' F-SCZ-043-103', '))
1,
2013,
6
)
)
Best regards, Marcelo
Tags: Java
Similar Questions
-
View BC item from the ref cursor oracle
Is there an easy way to jdev 11.1.1.4 to create a view based on a ref cursor oracle object?It's in the docs http://docs.oracle.com/cd/E21043_01/web.1111/b31974/bcadvvo.htm#sm0341 search for 'How to create a display on a REF CURSOR object'
An example can be found here http://adfpractice-fedor.blogspot.de/2011/01/adf-bc-programmatically-populated-vo.htmlTimo
-
help how to extract the ref cursor in the table field
Hello.
I have a query similar to the following:
Expecting to get several lines, I want this select this option to be in bulk sampled in a table variable nested (of another type of nested table) which is copied to an out parameter in a procedure. I have some doubts:select department_id, cursor (select employee_id from employees where department_id = d.department_id) from departments d
1 should. what I create the column in the inner nested table that will keep the result of the ref cursor? Ref cursor colunm? A sort of column Adrien?
2. If the column in the nested table inside that will keep the result of the ref cursor is another array, how can I write the result of the entire query in a single volume?
(I want to bulk collect everything in a single query, I know how to do with pl/sql do not inflate but using two nested for loops, that's what I try to avoid).
Thanks in advance.It would be simpler:
declare type dep_emp_list_tbl_type is table of sys.OdciVarchar2List; v_dep_emp_list_tbl dep_emp_list_tbl_type; v_dep_id_tbl sys.OdciNumberList; begin select department_id, cast(multiset(select employee_id from hr.employees where department_id = d.department_id) as sys.OdciVarchar2List) bulk collect into v_dep_id_tbl,v_dep_emp_list_tbl from hr.departments d; end; /
SY.
-
How to start the APEX in Oracle developer pre-built VM
Hello community,
I have download the DB VM developer
Developer Day - database application development practice
I start the virtual machine, but do not know how I can start the listener of the apex and ADR?
I assume that the virtual machine is ready for anything and play without the developer dealing with service installation and configuration?
I watch the lsnrctl status:
[oracle@localhost ~] $ lsnrctl status
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on April 9, 2015 11:50:27
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connection to (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST=0.0.0.0) (PORT = 1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start date April 9, 2015 11:04:17
Uptime 0 days 0 h 46 min 9 s
Draw level off
Security ON: OS Local Authentication
SNMP OFF
Parameter Listener of the /home/oracle/app/oracle/product/12.1.0/dbhome_1/network/admin/listener.ora file
The listener log file /home/Oracle/app/Oracle/diag/tnslsnr/localhost/listener/alert/log.XML
Summary of endpoints listening...
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=0.0.0.0) (PORT = 1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = ipc) (KEY = EXTPROC1521)))
(DESCRIPTION = (ADDRESS = (PROTOCOL = tcp (PORT = 2121))(HOST=localhost)) (Presentation = FTP)(Session=RAW))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=localhost)(PORT=5500))(Security=(my_wallet_directory=/home/oracle/app/oracle/product/12.1.0/dbhome_1/admin/cdb1/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Summary of services...
Service 'cdb1' has 1 instance (s).
'Cdb1' instance, State LOAN, has 1 operation for this service...
Service 'cdb1XDB' has 1 instance (s).
'Cdb1' instance, State LOAN, has 1 operation for this service...
Service "orcl" has 1 instance (s).
'Cdb1' instance, State LOAN, has 1 operation for this service...
The command completed successfully
It seems that there is no listener for APEX or ADR
How can I get that will easily?
I just downloaded the latest ADR. Unzip it and do
java-jar
ords.jar and follow the prompt and it works
two things I noticed.
- Make sure that apex_public_user is good to go
- make sure to put the correct directory for static
- Choose a port that is not used
the configuration is in properties files and need to be changed...
I wonder why this virtual machine does not right out of the box and looks like it sets up to 8080
but it does not work when I do one
localhost: 8080 / apex
I guess that everything should work right out of the virtual machine and config...
-
How to clear the Ref Cursor runtime error
Hello everyone,
the code as follows
When I run this code im gettingcreate or replace procedure Country_sel(key in varchar2) as cc Res_RelcountryLan.countrycode%type; len Res_Language.langname_en%type; lid Res_Language.langid%type; ab Res_Language.Abrivation%type; type refcursorr is ref cursor; cur refcursorr; d_stmt varchar2(100); begin d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||', RL.Abrivation from Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId'; open cur for d_stmt; loop fetch cur into cc,lid,len,ab; if cur%found then dbms_output.put_line(cc||lid||len||ab); else exit; end if; end loop; close cur; commit; end Country_sel;
can you please help me get rid of this problem.ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at "RASOOL.COUNTRY_SEL", line 11 ORA-06512: at line 6
thanking you,
Prakashd_stmt varchar2(100);
Increase the size of d_stmt. Your an a larger string assignment
d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||',RL.Abrivation from Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId';
The size of the string above is more than 100 characters.
-
How to create control provided by PL/SQL ref-cursor
Dear valuable experts,
I'm migrating oracle forms10g for JDeveloper. Currently I need a guideline or a reference to create pages of the ADF using the PL/SQL-Refcursor rather then tables or views.
I need help also how can I create using PL/SQL (package) - Refcursor datacontrol.
Please help me.
(!)
Thank you.
Zed
====Zed,
The Fusion developer's Guide has 35.9.4 article titled "How to create a view object on a REF CURSOR" which should help you.
John
-
How to start the database and servers after the installation of the Webcenter JSK Portal
Hello
I finally installed the portal WebCenter using JSK, after it turned off the machine, I don't know how to start the database or server, I need to set the environment variables? create the oracletab file? or is it a file .sh to start the database and servers?
Any help will be great!
Best regards!
Thanks Françoise-Oracle for your response
As you say, I need to go to /WCPortal_JSK_Linux.x 86-64/linux64, I found all the scripts that I needed to start or stop a server or database. But more especially if you run evertything, (I did) you just need to run the de./startup.sh script and wait, he'll run, but take some time.
Best regards!
-
I can't understand how to start the calendar after the migration.
I can't understand how to start the calendar of lighting. Documentation, said he will start automatically, but it doesn't.
I reinstalled Thunderbird with the XPI in the folder with the exec install and now it works. Install documentation is poor.
-
Hi, after you install Minecraft in my iMac, I get this message: "cannot start minecraft, if you run from a dmg, please drag applications and try again. I Don t know how to start the game. Thank you
So what measures through 'install '?
-
How to start the assessment without a device
Hello
I downloaded the evaluation version.
How to start the assessment without a device?
Thank you
DV63
Hi DV63,
Welcome to the Forums EITHER!
If you downloaded an evaluation version of LabVIEW your 30 day trial must begin immediately after being invited to enter a serial number. You can choose not to enter a serial number and this will begin your trial period. I recommend that you install OR-DAQmx device drivers; It is a software that allows you to communicate with the hardware from National Instruments DAQ. However, this facility will be particularly useful because it allows you to simulate an Instrument with the measurement and Automation Explorer (MAX); This means that you can immediately start the signals in LabVIEW.
-
I discovered that Windows defender is disabled. I tried to turn it back on, and he said that there is an error. How can I turn it back on? Anyone with information would be a great help. How to start the service manually? __
Hellocould a. you give us the exact error that you are experiencing?
(b) also mention the error code, as well if it is listed.
have c. you installed other software security like McAfee, Microsoft Security Essentials etc. ?
Let us check if the service is set to automatic.1. Click Start-> run and type services.msc
2. now, locate the service named Windows Defender,
3. double click to bring up the Properties window.
4. set the startup type to automatic
5. click on apply, and then click Start
6. click OK, and then click Close window Services/LocalWe hope to hear from you soon.Thank you, and in what concerns:
Shekhar S - Microsoft technical support.Visit our Microsoft answers feedback Forum and let us know what you think.
If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly. -
How to start the database using CRS to start the database instance
Dear Experts,
How to start the database using CRS to start the database instance
As a solution: remove the write permission on the/etc/oratab user database to prevent update to arrive.
There is no harmful effects known to CRS / RDBMS operation if this workaround solution is used. This has been discussed in Bug 13028802.
-
How to start the agent on the database host computer that is being monitored
Hi all
I installed OEM 11.2.1.0. I stopped getting alerts after the 1 server node is restarted. I followed RAC database.
When I checked the status of the host agent I get the following output
[oracle@rs1pre91dvdba01 bin] $ pwd
/ u01/app/Oracle/agent11g/bin
State of the agent emctl [oracle@rs1pre91dvdba01 bin] $
ORACLE_UNQNAME environment variable not defined. Please install ORACLE_UNQNAME in unique name of database.
[oracle@rs1pre91dvdba01 bin] $ export ORACLE_UNQNAME = MDM11
State of the agent emctl [oracle@rs1pre91dvdba01 bin] $
The MA Configuration problem. /U01/app/Oracle/product/11.2.0/dbhome_1/rs1pre91dvdba01_MDM11 not found.
[oracle@rs1pre91dvdba01 bin] $
And even on node 2
[oracle@rs1pre91dvdba02 bin] $ pwd
/ u01/app/Oracle/agent11g/bin
[oracle@rs1pre91dvdba02 bin] $ export ORACLE_UNQNAME = MDM12
State of the agent emctl [oracle@rs1pre91dvdba02 bin] $
The MA Configuration problem. /U01/app/Oracle/product/11.2.0/dbhome_1/rs1pre91dvdba02_MDM12 not found.
Please can I know how to start the agent on the nodes and also auto how the boot process of the agent on the server restart
Thank you.I assume that you have installed your agent in the directory
/ u01/app/Oracle/agent11g/bin
If this is correct then run the following commands
Export ORACLE_HOME = / u01/app/oracle/agent11g /.
export LD_LIBRARY_PATH = / u01/app/oracle/agent11g/libPATH = $ORACLE_HOME/bin:. : $PATH; export PATH
As a matter of fact, you need to set the environment variables separate for the agent to execute commands
which are related to the agent. These distinct environment must be set correctly to ensure that the
commands can be found in the appropriate directories...Then, run the status command emctl agent...
-
How to start the service in order
Hello
I'm new to Hyperion.
Can someone tell me how to start the service for HFM, planning and Essbase?
Thanks in advance...
HanPlease read the following document:
http://download.Oracle.com/docs/CD/E12825_01/EPM.111/epm_install_troubleshooting.PDF -
Hello
I installed the database 10g on linux
How to start the isqlplus in the browser window
Is there a command that I need to run
pls helpSee:
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14196/em_manage006.htm#sthref168Edit
In fact, there is an OBE on this subject as well:
http://www.Oracle.com/technology/OBE/obe10gdb/install/isqlplus/isqlplus.htmPublished by: hoek on December 30, 2009 08:38
Maybe you are looking for
-
Error code: sec_error_ocsp_unauthorized_request
I'm NOT going to be nice. Here's the description - I disabled the option "question responder OCSP servers to confirm the current validity of certificates. Has no effect. Still, I get this error: An error occurred during a connection to * removed * .c
-
Re: Drivers for Toshiba e-STUDIO 160
Hi, I have an old toshiba e-STUDIO 160 MFP and I was wondering can I use it with Ubuntu Linux.I am looking for drivers, but without result. You can help me because all my PCs are Ubuntu Linux, and they cannot function without a printer.
-
I'M TRYING TO FOLLOW THE INSTRUCTIONS AND DON'T KNOW WHAT IT IS
-
Duplex printing legal size paper Officejet Pro 8620
I have a HP Office Jet Pro 8620. It models the paper legal duplex printing? I get the conflict messages when you try to print. I can't find any details regarding legal paper in the manual duplex. Thanks for any help you can give.
-
I changed my computer; in the former, I installed Adobe Acrobat 7 Pro. I installed the DVD this software in the new computer, the installed software apply for registration, and it is not possible online or by phone because I get an error message: "Se