Creating Cursor For Every Class?
Aug 24, 2008
I'm modifying a package which contains a function with different parameters (say cno, gno, pname etc) need to be passed though it and that function is called by the cursor later in the program. I need to create a cursor (select statement) for every class (a program set)...i.e. multiple select statements for a program set with different values. The parameters needed to be passed correspond to same columns in different tables...so do i have to refer those tables everytime i'm passing the parameters using a select statement? The Program accepts the parameters as an array (list of parameters) and returns a cursor and the program handles one program set (class) at a time. That parameter list will be in a loop..i.e. it will be repeated for every certain combination (say cno - pname combination). So ... How should i proceed and create a select statement with different parameters declared in the function of type string making it dynamic and returning them using ref cursor?
View 1 Replies
ADVERTISEMENT
Nov 19, 2013
I am writing this procedure with a explicit cursors defined in it. However when i compile the procedure i get this error: Error(39,1): PL/SQL: SQL Statement ignored Error(39,1):PLS-00394: wrong number of values in the INTO list of a FETCH statement .
create or replace PROCEDURE PRO_ICMISd_customer_no BB_PM.customer_no%type;d_pr_code_bbl BB_PM.pr_code_bbl%type;d_pr_code_pmm BB_PM.pr_code_pmm%type;d_subdept_desc PM.subdept_desc%type;d_class_desc PM.class_desc%type;d_cat_desc PM.cat_desc%type;d_subcat_desc PM.subcat_desc%type;d_brand_name PM.brand_name%type;d_product_desc PM.product_desc%type;d_unit_price_bbl PM.unit_price%type; e_customer_no BB_PM.customer_no%type;e_pr_code_bbl BB_PM.pr_code_bbl%type;e_pr_code_pmm BB_PM.pr_code_pmm%type;e_subdept_desc PM.subdept_desc%type;e_class_desc PM.class_desc%type;e_cat_desc PM.cat_desc%type;e_subcat_desc PM.subcat_desc%type;e_brand_name PM.brand_name%type;e_product_desc
[code]....
View 17 Replies
View Related
May 27, 2008
How to display row value of each class as a column value
IDNAMECLASSHOURSSCHOOLNAME
1AllenMaths12school1
2SamMaths12school1
4PamMaths10school1
3SamComp10school1
9SmithComp15school1
7SmithPhy20school1
5PamPhy12school1
[code]....
I wanted output like below for School1
NamemathsCompPhyAccountsBusiness
Allen120000
Sam1210000
Pam10012150
Smith01520120
Adams000030
I wanted output like below for School2
NameCompAccountsBusiness
Anthony2000
Chris102020
I wanted output like below for School3
NamemathsAccounts
Angelo2015
Robert1515
how to write a single query, Also i may add /delete school/class anytime. Query should support mesans everything dynamically should get the data.Even stored procedure will work for me.
View 3 Replies
View Related
Jun 2, 2010
My technical environment is: Win xp, dev9i AS vers9.0.2, Jinit vers1.3.1.9, OracleDB9i.
I created a sound,java file using Oracle9i JDeveloper, I compile it and the result is:
" Compiling...
D:Dev9ijdevWorkspaceWorkspace5soundsrcoracleformsfdSound.java
Successful compilation: 0 errors, 0 warnings."
I deploy sound.java to sound,jar and the deployed process is completed Successfully. I also executed all the configuration steps required to use this class from "Orale9i form builder" and it's ok
The problem is:
When I tried to import "sound" class from "Oracle9i form builder" by clicking
Program----> Import Java Class-----> Oracle.forms.fd.sound
Then an error has occurred:
Importing Class oracle.forms.fd.Sound...
Exception occurred: java.lang.NoClassDefFoundError: oracle/forms/ui/VBean
View 8 Replies
View Related
Sep 24, 2013
I need to filter ticket prices according to the class; i.e.
CASE WHEN booking_class = 'Economy' THEN economy_saver ELSE 0 END AS ECONOMY_SAVER THEN economy_basic ELSE 0 END AS ECONOMY_BASIC THEN economy_basic_plus ELSE 0 END AS ECONOMY_BASIC_PLUSEND, CASE WHEN booking_class = 'Business' THEN business ELSE 0 END AS BUSINESS THEN business_flexible ELSE 0 END AS BUSINESS_FLEXIBLEEND.
..The objective is to show only the prices that belong to the selected class. I am not sure if my sql is correct at this point.
View 7 Replies
View Related
Mar 28, 2013
I have database 10.2.0.3 with one procedure that calls some java class loaded in database. Unfortunately I don't have source code of that java class or whole jar that was loaded into database.I would like to download it from database and try to decompile it.
how can I download some java classes from database? Everything I know is only the name of some java class that is used in one PL/SQL procedure (CREATE OR REPLACE PROCEDURE ..... AS LANGUAGE JAVA).
View 1 Replies
View Related
Sep 22, 2013
when I import java class from oracle forms (import java class ->> FFileChooser) appeared FFileChooser package but i don't know how use it how use OPEN_DIALOG or other function .
View 2 Replies
View Related
May 16, 2010
I am using Developer 10g R2. I have a form with two fields named input_value and output_value and a button named ok. I have a java class named Factorial which return the factorial of the input value. Now i want to use this class into pl/sql in ok button.
View 4 Replies
View Related
Apr 12, 2010
I need to add one validation in one form. The form is not getting run locally because of some imported java classes which was already there. From application server it works fine. When i run locally it gives ORA_JAVA.EXCEPTION_THROWN. Actually some trigger calls a procedure from this imported java class. Some path is specified in JNI.NEW_OBJECT(). That patg may not be in local system. If those files are included in our oracle home directory
View 4 Replies
View Related
Jun 7, 2013
I need to invoke a JavaMail code from oracle server. Conditions are :
On insertion of a row in a table a TRIGGER is to be run. This trigger would invoke a java code, that shoots an email, with desired credentials and login.
The code to send email, is based on JavaMail API, and is compiled on JVM version, 1.6.
The javaMail code can be loaded in oracle server using:
loadjava -user scott@TESTDB SendMailSSL.class
Another code doscmd.class is written and loaded in oracle, that is compiled in java 1.5. It is intended to call the SendMailSSL.class
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
[code].....
Is there a way to invoke SendMailSSL.class, without upgrading the oracle Java version
View 3 Replies
View Related
Jul 18, 2012
When working with SQL Server it's possible to execute several sql statements in one command of the DataAdapter in ADO.Net Now I try the same thing with an oracle database and recieve error ORA-00911: invalid character.
When remove ;character from query it again gives error- ORA-00933: SQL command not properly ended.
My query is like this-
update activity set activityname='Route Survey' where activityid=1;
SELECT * FROM activity where activityid=1
View 4 Replies
View Related
Jun 19, 2007
I have imported a java class file that inturn gets content from a webservice. One of the functions on that imported class file is as follows ...
Funtion getcontent(A1 JOBJECT,A2 JOBJECT, A3 String) return JOBJECT ....
In my PLSQL package ...How do I invoke this class file ?
So far I have done this ...
Declare
abc ORA_JAVA.JOBJECT;
xyz ORA_JAVA.JOBJECT;
xxx VARCHAR2(25);
value ORA_JAVA.JOBJECT;
BEGIN
[code]...
I am getting an error saying the object type is wrong .... I would like to know how to assign a hardcoded value to the JOBJECT just to test before I continue.
View 20 Replies
View Related
Jul 13, 2012
Our system stores images on the unix filesystem. We scan full page images.
Our image specs are:
black and white: tiff, group4 compression, 300dpi. so files are about 40-80k compressed
photograpshs/gray scale: jpeg/jpeg compression 256 gray scale. Some images can be 2megs...but most of them are about 400-700k
We build a demo with forms10G/application server 1 year ago and performance was really bad. Took about 10-15 seconds to generate a report with 1 image of it...compared to about 1-2 secs using forms 6i. We just installed weblogic 11G (10.3.5) with forms 11gr2. I'm guessing performance will still be an issue but we will still be testing it.
Our users currently use nfs to access images on the unix server. So that would not changed.
- read_image from filesystem (c: unc path //server/images/.../1.jpeg)
- zoom in, zoom out (having vertical/hori scroll bars to move around...or best would be panning)
- save_image on filesystem
- fit to window/cancas
- always keeping aspect ratio
nice to have options, but not needed at this time
- save in blobs
- editing capabilities (mostly just select an area to delete, like black borders...some speckles here and there)
View 1 Replies
View Related
Jun 26, 2013
How to Pick / Extract the java class files from the database.? We have not maintained the latest codes in the oracle application server where java class code is residing.
All the Java Classes are available only in database. So we need to pick the latest java class code from production environment. In TOAD we tried but all class objects are listing at the left side but we are unable to take the code. So how can we take the latest codes(java classes) from the Production Database as a backup.
View 1 Replies
View Related
Dec 4, 2012
Most of my day to day work involves the support of DB2 on AIX and z/OS. I support the database infrastructure for one business system that runs on the Oracle RDBMS. The application is Oracle Transportation Management. The non-production environments don't get much traffic. If I sign into the TEST or DEV Enterprise Manager DB Control screen, the following warning is almost always listed on the main page:
Metrics "Database Time Spent Waiting (%)" is at 44.00384 for event class "Concurrency"
Enterprise Manager reports that this metric is continuously fluctuating above and below the warning threshold of 30% of db time when the environment is idle.To investigate(and I am no oracle expert, far from it), I ran the following:
SELECT * FROM v$session_event
WHERE WAIT_CLASS='Concurrency'
ORDER BY TOTAL_WAITS DESC;
By far, the top two entries in the result are the following:
SIDEVENTTOTAL_WAITSTIME_WAITEDAVERAGE_WAITMAX_WAIT
124os thread startup12041423733.5218
359os thread startup150653433.5521
[code]...
Does this indicate a possible problem with the operating system?
View 2 Replies
View Related
Dec 14, 2012
i'm trying to install Oracle Apex Listener but when i try to open the apex.war file is giving me an error:
$ java -jar apex.war
Failed to load Main-class manifest attribute from apex
i see in another topic that if i create a txt file inserting the MainClass: Main-Class that my error will disappear.
i'm using VM with OEL 5
View 4 Replies
View Related
Apr 16, 2013
Having trouble installing Oracle 11g. After I select system class, the installer just closes out. I have re-download the software from the Oracle and made sure both files were unzipped into the same folder correctly. Searching around this forum found same problems, none of the solutions have worked so far. Tried setup -jreLoc (Location of Java), tried using it with different versions of java. If it tries to start the installer it gives an error about not being able to locate java runtime.
Specs: Windows 7 Ultimate x64
8GB Memory
930GB Free (on drive i want to install oracle on)
Files Download:
win64_11gR2_database_1of2.zip
win64_11gR2_database_2of2.zip
View 11 Replies
View Related
Aug 27, 2011
<jsp:useBean id="BC" scope="page"class="oracle.apps.barcode.util.BarCodeConstants" />
<jsp:useBean id="BM" scope="page" class="oracle.apps.barcode.BarCodeMaker" />
This code makes me unlucky while run that jsp report on web and comes up with orror no out put for the job.RegEdit REPORTS_CLASSPATH set to my oraclebarcode.jar with others jar files.
At Report builder web layout works fine [With Barcode generation] but not through Report server.
View 5 Replies
View Related
Jul 26, 2013
In my Organization I am trying to install oracle ODTwithODAC112030 but one Error showing that is java virtual machine could not find main class program will Exit.
Server Configuration Dell power Edge r510 Windows 2003 64 bit serv PAck 2 Citrix Presentation server 4.5 .
View 1 Replies
View Related
Sep 7, 2007
I'm dealing with an ORA-1000 error in a Pro*C application where all the cursors are correctly closed (or so it seems to me).
Here is the code for a simple program which reproduces the problem:
Each cursor is opened in a PL/SQL package:
CREATE OR REPLACE PACKAGE emp_demo_pkg AS
TYPE emp_cur_type IS REF CURSOR;
PROCEDURE open_cur(curs IN OUT emp_cur_type, dept_num IN NUMBER);
END emp_demo_pkg;
[Code]....
While testing the initialization parameter open_cursors is set to 50.
It's my understanding that Oracle doesn't close the cursors until it needs the space for another cursor, which in my test case seems to happen when I enter a value of 50 or bigger for "number of loops". To see how oracle is reusing the cursors, while the test program is running I run SQL*Plus and query v$sesstat for the session that's running the test with the following sentence:
select name, value
from v$sesstat s, v$statname n
where s.statistic# = n.statistic#
and sid = 7
and name like '%cursor%';
Even before I enter a value for number of loops I can see that the session opened 4 cursors and closed 2 of them:
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 4
opened cursors current 2
Entering a value of 5 for number of loops yields
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 11 <----- 7+
opened cursors current 8 <----- 6+
With a value of 30
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 36 <----- 25+ (apparently, Oracle reused at least 5 cursors)
opened cursors current 33 <----- 25+
With a value of 47
NAME VALUE
---------------------------------------------------------------- ----------
opened cursors cumulative 53 <----- 17+
opened cursors current 50 <----- 17+
Now I reached the upper limit set by the initialization parameter open_cursors.
Entering a value of 48, I get the ORA-1000 error.
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SCOTT.EMP_DEMO
Since I open and close the cursor in the same loop iteration, I expect to find in every iterarion 1 explicit cursor and a number of implicit cursors (the PL/SQL call along with the so-called recursive cursors), but I don't expect the sum of all of them to be greater than 50. If my understanding is correct Oracle should be reusing the 50 cursors previously marked as "closeable", not raising the ORA-1000 error.
View 1 Replies
View Related
Feb 25, 2011
Is it possible to:
-define a cursor with bind variables
-get a cursor record from these cursor
-and pass the bind variable in the OPEN clause
Did'nt succeed as shown in the example.
SET SERVEROUTPUT ON SIZE 900000;
DECLARE
--works fine
CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<3;
--doesn't work
--CURSOR c1 IS SELECT * FROM USER_TABLES WHERE rownum<:1;
crec c1%rowtype;
BEGIN
--works fine
OPEN c1;
--isn't possible ?
--OPEN c1 USING 3;
[Code]....
View 3 Replies
View Related
Sep 11, 2011
just looking around to use the new feature available in oracle 11g to convert the dbms_sql numeric cursor to reference cursor, how to do it?
parse and execute the sql string first with dbms_sql and then convert it to ref cursor?
View 1 Replies
View Related
Nov 23, 2011
I want to return ref cursor based on explicit cursors
create table jumbo(id number, name varchar2(20));
insert into jumbo values(1,'jumbo');
create table mumbo(id number, name varchar2(20));
insert into mumbo values(1,'mumbo');
commit;
[Code].....
The above procedure has compilation errors when I am trying to open ref cursor
LINE/COL ERROR
-------- --------------------------------------------------------
20/24 PL/SQL: SQL Statement ignored
20/38 PL/SQL: ORA-00942: table or view does not exist
32/24 PL/SQL: SQL Statement ignored
32/38 PL/SQL: ORA-00942: table or view does not exist
SQL>
View 5 Replies
View Related
Aug 7, 2013
Can i user exist when cursor will using For Cursor .
View 15 Replies
View Related
May 20, 2013
i`m trying to use pl/sql function to execute java class. I created 2 tables with around 100 values and java class with simple functionality. I need to create function to loop through my table1 and get with each iteration one value from table and pass that value as parameter to java class.
table1 is something like this:
ID NAME
1 name1
2 name2
3 name3
. .
. .
100 name100
table2 is empty with same columns as table1 ( table2 is for data obtained from java returns ) I created in sql+ java class.
CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "myClass" AS
import java.io.*;
import java.util.*
public class myClass {
public static String fun(String strName)
[code]....
Then i wanna make a pl/sql function for:
1)For i = 1 Obtain first value from table1 (column name) and pass it throught java class then return value and save it in table2 with the same id as id from table1
2) change i=1 to i=2 and do that same
3) end if i=101
View 1 Replies
View Related
Feb 7, 2011
creating an ASM instance. I've never done this before and searched all known documentation. I just can't seem to figure this out. This is an 11g database on a WinXp machine for testing purpose before attempting to do this on a live production environment
D:\app\user\product\11.1.0\db_1\BIN>localconfig add
Step 1: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'Dummy\user', privgrp '
Operation successful.
Step 2: creating new CSS service
Failed to create the new CSS service, err(5)
failed to create CSS services
View 6 Replies
View Related
Feb 18, 2011
I have created a sequence and I would like to create a surrogate key in one of my tables that will take the values of the sequence. I searched for hours but couldn't find any example of how to do that.
View 1 Replies
View Related
Jul 19, 2011
I need to create a trigger for the below case:
index_id Time_vertex_id date rate pre_rate
4 1 17-06-2011 4.7 6.4
4 1 16-06-2011 6.4 7.4
4 1 14-06-2011 7.4
4 1 15-06-2011 8.4 7.4
the index_id and time_vertex_id will be unique and when the date is 17th i.e the first date will be inserted the current rate will be 4.7 and the previous rate will be blank and when another date is inserted i.e 16th the previous rate of 17th will be the current rate of 16th i.e 6.4.
when 14th is being inserted, the previous rate of 16th will be the current rate of 14th i.e 7.4 and if after 14th is being inserted, 15th is being inserted, then the previous rate of 16th should be updated as per the current rate of 15 say 8.5.
View 5 Replies
View Related
Jun 3, 2010
If iam create a new role in scott/tiger user why not creating. can any one explan me.
SQL> create role test_role;
create role test_role
*
ERROR at line 1: ORA-01031: insufficient privileges
View 2 Replies
View Related
Sep 18, 2010
I am writing the following PLSQL code-
BEGIN
DBMS_SCHEDULER.CREATE_JOB
(
job_name=>'TRIAL JOB',
job_type=>'PLSQL BLOCK',
job_action=>
[code]........
The new table used above has the following structure
Name Null? Type
STAMP TIMESTAMP(6) WITH TIME ZONE
However I get the following error on execution and am not able to make out why?
BEGIN
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at line 3
View 4 Replies
View Related