error message: ORA-01422:
Hi allWhen executing a package, I got an error message:
ERROR on line 1:
ORA-01422: exact fetch returns more than number of lines
I wrote an exception to the too_many_rows, who took care of the mistake, but my question is the exception made condition get connected anywhere?
Thank you
Hello
user12296910 wrote:
can you please give an example how to save error message?
EXCEPTION
WHEN TOO_MANY_ROWS
THEN
errm := SQLERRM;
INSERT INTO my_error_log
( error_log_id
, proc_name
, user_name
, error_dt
, error_msg
)
VALUES
( error_log_id_seq.NEXTVAL -- error_log_id
, 'MY_PROC' -- proc_name
, USER -- user_name
, SYSDATE -- error_dt
, errm -- error_msg
);
In practice, you would probably want to a separate procedure to do the Insert, and you call this procedure of article of EXCEPTION.
Tags: Database
Similar Questions
-
Error message ORA-01722 loading data from text file
Hi all
I want to load data into the table 'dh_healthcare '.
with the columns:
...
NUMBER OF RMI,
NUMBER OF KUM,
...
Loading data with the APEX data workshop, I got the error message ' ORA-01722: invalid number. "
For example, ALEXIS has the following values:
1.99
6.49
4.14
...
KUM:
139,30
51.32
165,23
...
I tried to put the precision and scale in the column definition, but the same error message appears.
When I changed the data type of these columns in VARCHAR2 (60) the data loaded without error message.Someone at - it an idea to solve the error?
Thank you
Ben
This has to do with the settings of NLS Session about the decimal separator and the group separator.
How you load the data in the table determines where and how you set the Session variables.
MK
-
Error message ' ORA-12547: TNS: lost contact "in dbca
Background info: I am building a cluster RAC test 11.2.0.3 running on a hardware IBM pSeries with AIX 6.1 operating system level. I need to create a cluster, and then adding a new node later practice. Due to availability limited hardware, my initial cluster will be node 1 and I'll add additional nodes later.
I installed successfully grid Infrastructure. GI and ASM are online and seem to function normally. Today, I installed the 11.2.0.3 database software. Now, I'm trying to create a test using DBCA database. After you have entered all the information database (SID information, where must reside files db, sizing of memory, etc.), the creation of the database starts, then immediately emits the error message ' ORA-12547: TNS: lost contact. "
I searched MOS (Metalink) and also reviewed a few sites using Google. All the information indicates that this problem most often occurs when you try to connect to an existing database using sqlplus. I have not found that everything about this error message when the database was created.
Does anyone have advice on how to troubleshoot the problem? Can you point me to some documents that could help with this issue?
Any help is appreciated. Thank you!Search MOS for "ORA-12547 dbca" and you will get a few hits - see if those who help.
PL also spent the last 100 lines in the Setup log - http://docs.oracle.com/cd/E11882_01/install.112/e24332/app_ts.htm#i1090466
HTH
Srini -
Foreign key Error Message ORA - 01430
I have a LSU_INTER_RESOURCES_T table name. I would like to add a constraint foreign key with the following command:
ALTER table lsu_inter_message_t
Add constraint inter_message_id_fk
inter_request_id lsu_inter_requests_t (inter_request_id) ON DELETE CASCADE REFERENCES;
The system returned the error message:
ORA - 01430: added column already exists.
If I drop the inter_request_id column I'll lose data, and when I create the constraint it places the column at the end of the table. Data loss is not a problem now because the table has no data, but down the line, I see that there is a real problem.
I would like to have the foreign key defined in the sequence column, I chose when I designed the tabular presentation. IE I want to all key columns placed at the beginning of the table online.
Can I move the column after that I have set it and how this is done? Is this a feature of 10g?
Thank you, NedTry
alter table lsu_inter_message_t add constraint inter_message_id_fk foreign key(inter_request_id ) REFERENCES lsu_inter_requests_t(inter_request_id) ON DELETE CASCADE;
-
MERGER into slider throws the error message: ORA-01747
Hi guys,.
I'm new in PL/SQL and I'm taking the last row of a database table and add the same data in another table with the same structure, but for the ancestors of the current employee. Something like:
Day EmpID LOB (key fields)
12-1007-29
EmpID has 24 and 95 ancestors. That's why in the destination table I have to insert (or update of status and idforum if these three key areas already exists):
EmpID LOB day
24 1007 29
95-1007-29
There are 4 tables:
X - table base;
Y - destination table (same structure as X);
Z - the relationship between the employee and ancestor;
W - plays the role of a temporary table, but is a real table - only for the MERGER;
============================================================================================
create or replace
PROCEDURE INSERT_PARENTS AS
BEGIN
DECLARE
EMP_VAR NUMBER (38.0). -employee
NUMBER OF ANCESTOR_ID; -relative of the employee
NUMBER OF LOB_VAR; -LOB
NUMBER OF DAY_VAR; -date of
NUMBER OF FORUMID_VAR; -Idforum
STATUS_VAR VARCHAR2 (20); -Status
Parents of CURSOR
IS
SELECT ancestor_key FROM Z WHERE member_key = EMP_VAR; -This slider will go through all the ancestors of the employee
Number EMPROWID_VAR; -It's the key to the table Y (destination table)
BEGIN
-extract the last line of the table of database variables
SELECT EMPL_KEY in the EMP_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT LOB_KEY in the LOB_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT DAY_KEY in the DAY_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT IDFORUM in FORUMID_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT STATUS in STATUS_VAR OF X WHERE EMPROW_ID = (SELECT Max (EMPROW_ID) OF X);
SELECT NVL (Max (EMPROW_ID), 0) + 1 in EMPROWID_VAR OF Y; -initialize the key to the table max + 1 of the existing key Y
Parents OPEN.
LOOP
EXTRACT the parents in ANCESTOR_ID;
EXIT WHEN parents % NOTFOUND;
EMPROWID_VAR: = EMPROWID_VAR + 1;
-the value of the new key for Y
INSERT w (emprowid_var, lob_var, ancestor_id, day_var, forumid_var, status_var)
VALUES (EMPROWID_VAR, LOB_VAR, ANCESTOR_ID, DAY_VAR, FORUMID_VAR, STATUS_VAR); -prepare the source for the MERGE statement
-merge data between 2 tables:
-If a parent already exists in the destination, to update just idforum and the new status
-If that parent does not exist in the dest table, will be inserted with the status ' U/R '.
MERGE TO Y Dest
USING the W
WE (Dest.LOB_KEY = Surce.LOB_VAR AND)
Dest.EMPL_KEY = Surce.ANCESTOR_ID AND
Dest.DAY_KEY = Surce.DAY_VAR)
WHEN MATCHED, THEN update to SET (Dest.FORUMID = Surce.FORUMID_VAR,
Dest.STATUS = Surce.STATUS_VAR)
WHEN NOT MATCHED THEN INSERT (Dest.EMPROW_ID, Dest.LOB_KEY, Dest.EMPL_KEY, Dest.DAY_KEY, Dest.FORUMID, Dest.STATUS)
VALUES (Surce.EMPROWID_VAR, Surce.LOB_VAR, Surce.ANCESTOR_ID, Surce.DAY_VAR, Surce.FORUMID_VAR, ' U/R');
END LOOP;
END;
END INSERT_PARENTS;
When I try to run this procedure (compile) I get this error message:
Error (53,37): PL/SQL: ORA-01747: invalid column, table.column, or user.table.column specification
Can you tell me where I am doing wrong? (I'm pretty sure that it's in the Merge statement, but what is it?)
Thanks in advance.
Published by: petresion on November 19, 2011 14:02without the paintings I never would have found
MERGE INTO y dest USING w surce ON (dest.lob_key = surce.lob_var AND dest.empl_key = surce.ancestor_id AND dest.day_key = surce.day_var ) WHEN matched THEN UPDATE SET dest.forumid = surce.forumid_var, dest.status = surce.status_var WHEN NOT matched THEN INSERT ( dest.emprow_id, dest.lob_key, dest.empl_key, dest.day_key, dest.forumid, dest.status) VALUES ( surce.emprowid_var, surce.lob_var, surce.ancestor_id, surce.day_var, surce.forumid_var, 'U/R');
-
Error message: ORA-00821: specified value sga_target 4 M is too small
Hi all
My database instance is down, when I'm trying to start, it throws an error:
ORA-00821: sga_target 4 M value is too small, you must be at least 28 M
The problems began when erroneous changed sga_target for some values without specifying the unit.
My question is, how can I solve this problem, so that the database instance is down? I use spfile
I tried to start the instance with pfile (start pfile='D:\oracle\product\10.2.0\admin\orcl\pfile\init.ora') it throws errors:
LRM-00109: could not open parameter file "D:\oracle\product\10.2.0\admin\orcl\pfile\init.ora".
ORA-01078: failure in the treatment of system settings
Please someone help me
Concerning
SadikHello
What you can do in this case and you do not have a good pfile, you can proceed as follows:
1. find the spfile, normally in the directory of $ORACLE_HOME/dbs
2. a copy of the spfile to be sure will not be damaged.
3. on unix command prompt: string - a> newpfile.ora
4. check with the newpfile.ora editor and change. The pfile file will contain all of the settings and you must change the SGA_TARGET value to a height of 400M or more. Smaller values can be made, but are not advised to 10 gr 2 or higher.
5. try start the database using the newpfile.ora update.Hope this will solve your problem.
Best regards, Gerwin
-
error report: ORA-01422: exact fetch returns more than number of lines
I get this error in table form that should be filled by selecting a week called item description in this page by a dynamic action.
In the main table, I have two primary keys and so two foreign keys in the secondary table even if it is not a type of form master detail.
When I select the week description point and the related records in the form of sound. But it gives the above error.
In the main table, there are two records of same, in this user name folders is different which defines the unique character of the file.
It is really basic and happens if you have something like this in your code - the SQL code is supposed to return exactly ONE value and it returns two or more:
Denes Kubicek
-
Error Message ORA-31043: Element 'person' no globally defined in the schema
Hi all
We recorded 2 documents xsd as follows...
DECLARE lc_test_xsd CLOB; BEGIN lc_test_xsd := '<?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.xyz.com/cicat/types/basictypes/2/0" targetNamespace="http://www.xyz.com/cicat/types/basictypes/2/0" version="2.0"> <simpleType name="LastNamePrefix"> <annotation> <documentation> Additional word to last name (name prefix) corresponding to SAP HR Core Table T535N; V. </documentation> </annotation> <restriction base="tns:String255" /> </simpleType> <simpleType name="CountryID"> <annotation> <documentation> Codes for the representation of country names according to ISO 3166. </documentation> </annotation> <restriction base="string"> <maxLength value="2" /> </restriction> </simpleType> <simpleType name="LocationCode"> <annotation> <documentation> Code of a location, e.g. Fe, Wa2 or Kor. </documentation> </annotation> <restriction base="string"> <maxLength value="4" /> </restriction> </simpleType> <simpleType name="GenderCode"> <annotation> <documentation> Code of the gender: male, female, unknown. Unknown is used if the value is unknown or must not be stored due to legal restrictions. </documentation> </annotation> <restriction base="string"> <enumeration value="male" /> <enumeration value="female" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="String255"> <annotation> <documentation> String with 255 characters max </documentation> </annotation> <restriction base="string"> <maxLength value="255" /> <minLength value="1" /> </restriction> </simpleType> <simpleType name="RB-CostCenter"> <annotation> <documentation> Cost Center </documentation> </annotation> <restriction base="string"> <minLength value="3" /> <maxLength value="6" /> </restriction> </simpleType> <simpleType name="OrgUnitName"> <annotation> <documentation> Name of the Organizational Unit </documentation> </annotation> <restriction base="string"> <minLength value="1" /> <maxLength value="18" /> </restriction> </simpleType> <complexType name="StringMCA"> <annotation> <documentation> Multi Country String. Strings, which must be stored in ASCII code and country specific. The subelement ASCIIString contains the string encoded with ASCII. The subelement countrySpecificString allows country specific encoding. </documentation> </annotation> <sequence> <element name="asciiString" type="tns:String255" minOccurs="0" /> <element name="countrySpecificString" type="tns:String255" /> </sequence> </complexType> <simpleType name="OrgUnitID"> <annotation> <documentation> ID of the Organizational Unit </documentation> </annotation> <restriction base="unsignedInt"> <totalDigits value="8" /> </restriction> </simpleType> <simpleType name="GlobalID"> <annotation> <documentation> Global unique identifier of persons at xyz </documentation> </annotation> <restriction base="unsignedInt"> <totalDigits value="8" /> </restriction> </simpleType> <simpleType name="CiCatPersonID"> <annotation> <documentation> CI-CAT Identifier of Persons (CiCat-PID). Unique identifier of a person in CI-CAT </documentation> </annotation> <restriction base="unsignedInt"> <totalDigits value="20" /> </restriction> </simpleType> <simpleType name="CiCatAccountID"> <annotation> <documentation> CI-CAT Identifier of AD Accounts (CiCat-Ben-Sid). Unique identifier of AD Accounts in CI-CAT. </documentation> </annotation> <restriction base="unsignedInt"> <totalDigits value="20" /> </restriction> </simpleType> <simpleType name="PersonnelActionTypeCode"> <annotation> <documentation> The operation that was performed on the person: entry, data change, re-entry (into company), exit (out of company) </documentation> </annotation> <restriction base="string"> <enumeration value="entry" /> <enumeration value="data change" /> <enumeration value="re-entry" /> <enumeration value="exit" /> </restriction> </simpleType> <simpleType name="ContractStatus"> <annotation> <documentation> Contract Status: active, inaktive, resigned, retired </documentation> </annotation> <restriction base="string"> <enumeration value="retired"> <annotation> <documentation> End of contract relationship because of retirement </documentation> </annotation> </enumeration> <enumeration value="resigned"> <annotation> <documentation> End of contract because of quitting </documentation> </annotation> </enumeration> <enumeration value="inactive"> <annotation> <documentation> Incactive contract relationship, e.g. motherhood, suspension </documentation> </annotation> </enumeration> <enumeration value="active"> <annotation> <documentation> Normal contract status </documentation> </annotation> </enumeration> <enumeration value="deleted"> <annotation> <documentation> Contract physically deleted in the source system </documentation> </annotation> </enumeration> </restriction> </simpleType> <simpleType name="KnownAssociateCode"> <annotation> <documentation> Describes status of person to xyz: internal/external/fixed-term </documentation> </annotation> <restriction base="string"> <enumeration value="External" /> <enumeration value="Internal" /> <enumeration value="Fixed Term" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="AssociateCode"> <annotation> <documentation> Describes status of person to xyz: union of known values plus free string for not yet known types </documentation> </annotation> <union memberTypes="tns:KnownAssociateCode string" /> </simpleType> <simpleType name="KnownExternalRelationType"> <annotation> <documentation> Describes relation (contract relation) of external person to xyz: contractor/customer/supplier/subsidiary/selfregistered </documentation> </annotation> <restriction base="string"> <enumeration value="Contractor" /> <enumeration value="Customer" /> <enumeration value="Supplier" /> <enumeration value="Subsidiary" /> <enumeration value="Selfregistered" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="ExternalRelationType"> <union memberTypes="tns:KnownExternalRelationType string" /> </simpleType> <simpleType name="ValidityState"> <annotation> <documentation> If an attribute was taken over by an authoritative source such as HR-MDS or WOM. Set to "Valid" to indicate that the value was taken over from the source and is therefore valid. Set to "Invalid" if the source indicates the value is no longer value, e.g. because it got deleted. Otherwise set to "Unknown", e.g. when the value was entered manually. </documentation> </annotation> <restriction base="string"> <enumeration value="Valid" /> <enumeration value="Invalid" /> <enumeration value="Unknown" /> </restriction> </simpleType> <complexType name="HrPersonnelId"> <sequence> <element name="hrSourceSystem"> <annotation> <documentation> Name of HR source system </documentation> </annotation> <simpleType> <restriction base="string"> <minLength value="1" /> <maxLength value="20" /> </restriction> </simpleType> </element> <element name="hrPersonnelId"> <annotation> <documentation> ID of person in HR source system </documentation> </annotation> <simpleType> <restriction base="string"> <minLength value="1" /> <maxLength value="20" /> </restriction> </simpleType> </element> </sequence> </complexType> <complexType name="AccountType"> <annotation> <documentation> Types of Accounts: Three main categories are known: Person, resource or service account. A person account represents a single natural person. A resource account represents a resource such as a printer, a computer or a meeting room. Service Accounts represent everything else. The can be used for example for technical users or group accounts. Both resource and service accounts have an owner that is responsible for them. Each account type has subtypes for further categorization. </documentation> </annotation> <choice> <element name="personAccount" type="tns:PersonAccountType" /> <element name="resourceAccount" type="tns:ResourceAccountType" /> <element name="serviceAccount" type="tns:ServiceAccountType" /> </choice> </complexType> <simpleType name="KnownPersonAccountType"> <annotation> <documentation> Pre-defined types of Person Accounts </documentation> </annotation> <restriction base="string"> <enumeration value="Office" /> <enumeration value="Admin" /> <enumeration value="Test" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="PersonAccountType"> <union memberTypes="tns:KnownPersonAccountType string" /> </simpleType> <simpleType name="KnownResourceAccountType"> <annotation> <documentation> Pre-defined types of Resource Accounts </documentation> </annotation> <restriction base="string"> <enumeration value="Room" /> <enumeration value="PC" /> <enumeration value="Printer" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="ResourceAccountType"> <union memberTypes="tns:KnownResourceAccountType string" /> </simpleType> <simpleType name="KnownServiceAccountType"> <annotation> <documentation> Pre-defined Types of Service Accounts </documentation> </annotation> <restriction base="string"> <enumeration value="Group" /> <enumeration value="Machine" /> <enumeration value="Support" /> <enumeration value="System" /> <enumeration value="unknown" /> </restriction> </simpleType> <simpleType name="ServiceAccountType"> <union memberTypes="tns:KnownServiceAccountType string" /> </simpleType> <simpleType name="ActionType"> <annotation> <documentation> Defines the action that was performed on the object. </documentation> </annotation> <restriction base="string"> <enumeration value="Create" /> <enumeration value="Update" /> <enumeration value="Delete" /> </restriction> </simpleType> <simpleType name="LegalEntityId"> <annotation> <documentation> ID of a legal entity </documentation> </annotation> <restriction base="unsignedInt"> <totalDigits value="8" /> </restriction> </simpleType> </schema> '; DBMS_XMLSCHEMA.REGISTERSCHEMA (schemaurl => 'BasicTypes.xsd', schemadoc => lc_test_xsd); DBMS_OUTPUT.PUT_LINE('BasicTypes.xsd registration successfully completed'); EXCEPTION WHEN OTHERS THEN DBMS_OUTPUT.PUT_LINE('BasicTypes.xsd registration failed '||SQLERRM); END; /
See for example the effect of elementFormDefault of http://www.liquid-technologies.com/Tutorials/XmlSchemas/XsdTutorial_04.aspx for details.
The fix:
>
...
>I hope this helps!
-
Error - ORA-01422: exact fetch returns more than number of lines
Hello
I get the error when running script below. Please help me.
/****************** ERROR ******************/
Error report:
ORA-01422: exact fetch returns more than number of lines
ORA-06512: at line 71
01422 00000 - "exact fetch returns more than number of lines."
* Cause: Exact extraction specified number is less than the returned rows.
* Action: Rewrite the query or change the number of rows requested
/****************** SCRIPT ******************/
DECLARE
l_xml XMLTYPE: = XMLTYPE ("< LoggingInformation >
< commandeEmplacement >
< name > ServiceCall1 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
< status > completed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< ServiceLoggingEntries >
< item >
< foo > 1 < / foo >
< / ServiceInformation >
< item >
< foo > 2 < / foo >
< / ServiceInformation >
< / ServiceLoggingEntries >
< InformationLoggingEntries >
< ProcessInformation >
< bar > 1 < / >
< / ProcessInformation >
< ProcessInformation >
< bar > 2 < / >
< / ProcessInformation >
< / InformationLoggingEntries >
< / commandeEmplacement >
< commandeEmplacement >
< name > ServiceCall2 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
< status > completed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< ServiceLoggingEntries >
< item >
< foo > 3 < / foo >
< / ServiceInformation >
< item >
< foo > 4 < / foo >
< / ServiceInformation >
< / ServiceLoggingEntries >
< InformationLoggingEntries >
< ProcessInformation >
< bar > 3 < / >
< / ProcessInformation >
< ProcessInformation >
< bar > < / > 4
< / ProcessInformation >
< / InformationLoggingEntries >
< / commandeEmplacement >
< commandeEmplacement >
< name > ServiceCall3 < / name >
< StartTime > 2010-01-18T 11: 11:41.570664 - 00:00 < / StartTime >
< EndTime > 2010-01-18T 11: 11:43.8987741 - 00:00 < / EndTime >
< ElapsedTime > 00:00:02.3281101 < / ElapsedTime >
status of <>failed < / status >
< ExceptionMessage > error here... < / ExceptionMessage >
< ExceptionStackTrace > Stack Trace here... < / ExceptionStackTrace >
< / commandeEmplacement >
(< / LoggingInformation > ');
v_txt VARCHAR2 (2000);
BEGIN
SELECT XMLTYPE. Extract (value (TT),'/ CommandInformation/Name/Text () '). GETSTRINGVAL()
IN v_txt
TABLE (XMLSEQUENCE (l_xml. Extract('/LoggingInformation/CommandInformation'))) tt;
DBMS_OUTPUT. Put_line (v_txt);
END;Select...
means only 1 row can be returned.
Your select returns more than one line.
Change v_txt in a collection, define a cursor and the extraction of it or change the statement, i.e. it returns a single line.---------
Sybrand Bakker
Senior Oracle DBA -
ORA-01422: exact fetch returns more than number of lines
Hello world
I want to create a procedure only allows me to perform selection et Update in my database, I have already create the procedure and compiled without problems but when I want to run this procedure, I have this error
ORA-01422: exact fetch returns more than number of lines
This syntax of my procedure
create or replace procedure app is
i nombre := 100 ;
o_username employees.first_name% TYPE ;
o_lastn employees. Last_name %TYPE
o_sal. employees % of SALARY TYPE ;
Start
loop
/ * display * /.
Select first_name, LAST_NAME, SALARY
in o_username, o_lastn, o_sal
of admin.employees where employee_id = i;
DBMS_OUTPUT. Put_line (' name: ' | o_username);
DBMS_OUTPUT. Put_line (' first name: ' | o_lastn);
DBMS_OUTPUT. Put_line (' salary: ' | o_sal)
/ * put a days * /.
Update employees
put salary = salary + salary *0.25 where employee_id = i;
commit;
/ * dbms_put.put_line (' new salary is: ' | ') sell2_tab (i)); * /
i := i + 1 ;
/ * list the data * /
/ * dbms_put.put_line (' new salary is: ' ") ;*/
output when i = 200;
end loop;
end app;
thnx
create or replace procedure APP is
Constant START_ID EMPLOYEES. EMPLOYEE_ID % TYPE: = 100;
Constant END_ID EMPLOYEES. EMPLOYEE_ID % TYPE: = 200;
O_USERNAME EMPLOYEES. Type % name;
O_LASTN EMPLOYEES. Last_name type %;
O_SAL EMPLOYEES. Kind of % of SALARY;
Start
for rec (select FIRST_NAME, LAST_NAME, salary
the admin. EMPLOYEES
where EMPLOYEE_ID between START_ID and END_ID)
loop
DBMS_OUTPUT. Put_line (' name: ' | rec. NAME);
DBMS_OUTPUT. Put_line ("first name:" | ") Rec. LAST_NAME);
DBMS_OUTPUT. Put_line (' salary: ' | rec. SALARY) / * setting days * /.
end loop;
Update EMPLOYEES
Set SALARY = SALARY + SALARY * 0.25
where EMPLOYEE_ID between START_ID and END_ID;
commit;
end app;
-
Error message
ORA-00604: error occurred at recursive SQL ORA-01882 level1: region of the zone could not be found.
Today, I downloaded developer sql 3.0.04.34.
Everything was the same, but I couldn't connect oracle server with above message.
Here is my experience...
customerwindow7
java version "1.6.0_20.
Java
Java (TM) SE Runtime Environment (build 1.6.0_20 - b02)
The Client Java VM (build 16, 3 - b01, mode, mixed share)window timezone; bangkok
Oracle
local window; Korean
SQL developer zone; idk
local developer SQL; Koreanwindows 2003 Server
before I got here, I googled this problem.
9i
regional settings; idk
There are 2-3 solutions, but it did not work.
1 set the regional settings to the file sqldeveloper.confAddVMOption - Duser.timezone = "+ 07:00"
2 " set the regional settings to the file ide.confAddVMOption - Duser.timezone = "+ 07:00"
please help me. "
Thanks in advance.You can find more tips on your research: ora-01882 "zone schedule region not found" with 3.0.03.97 but not 3.0.03.45
Hope that helps,
K. -
Custom while logging an error message.
Hello
I have athunetication LDAP schema. I have a function in the database to return true or false to check ldap. 101 as login page using custom. If the password is entered wrong, I get this kind of error message
"ORA-06503: PL/SQL: function returned no value."
ERR-10460 error cannot perform the function of verification of the authentication credentials. "
I need to do 2 things, first to change the error message from the user friendly message. and display the error on the same page instead of on the new page.
Can you please specify?I need to do 2 things, first to change the error message from the user friendly message. and display the error on the same page instead of on the new page.
No, you must debug the function to make it so that it returns a value in all circumstances. This exception indicates a problem with the logic of operation that needs to be fixed. If this is the case then I think you won't have to do the 2 things that you think you do...
-
Hi all
We try to add new proposal for a salary of some employees from form August 1, 2015 (the Date of the beginning of employee)
There is no existing salary proposal doesn't exist for these employees.
We get below error.
ORA-01422: exact fetch returns more than the requested number of rows in the hr_maintain_proposal_swi procedure insert_salary_proposal package
Help, please.
Thank you
Tarun
Hi John,.
If it helps, take a look at the following note:
ORA-01422 exact Fetch returns more than number of lines requested in Hr_maintain_proposal_swi (Doc ID 1673527.1)
Kind regards
Rajen
-
ERROR "ora-01422" during insertion in the table?
Hello
I have created the dynamic action of PL/SQL to insert data but founded by page_item
declare x_found_pages number; x_auth_id number; x_user_id number; begin x_user_id := :P41_USR_ID; -- this is my page_item _____ successful run When change it to number value .. ! select count(V_APP_PAGES.PAGE_ID) into x_found_pages from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID and V_AUTH_DTL.USR_ID = x_user_id; select T_AUTH.ID into x_auth_id from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH where T_AUTH_DTL.AUTH_ID=T_AUTH.ID and T_AUTH.USR_ID = x_user_id; -- Checking...? if x_found_pages > 0 then for i in (select V_APP_PAGES.PAGE_ID from V_AUTH_DTL V_AUTH_DTL,V_APP_PAGES V_APP_PAGES where V_AUTH_DTL.PAGE_ID!=V_APP_PAGES.PAGE_ID and V_AUTH_DTL.USR_ID = x_user_id) loop insert into T_AUTH_DTL (AUTH_ID,PAGE_ID) values (x_auth_id,i.PAGE_ID); end loop; end if; end;
Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...
Thank you...
AMR Abdeen wrote:
I have created the dynamic action of PL/SQL to insert data but founded by page_item
- declare
- number of x_found_pages;
- number of x_auth_id;
- number of x_user_id;
- Start
- x_user_id: =: P41_USR_ID; -It is my page_item _ successfully performed when change to value the number...!
- SELECT count (V_APP_PAGES. Page_id) in x_found_pages
- of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
- where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
- and V_AUTH_DTL. USR_ID = x_user_id;
- Select T_AUTH.ID from x_auth_id
- of T_AUTH_DTL T_AUTH_DTL, T_AUTH T_AUTH
- where T_AUTH_DTL. AUTH_ID = T_AUTH.ID
- and T_AUTH. USR_ID = x_user_id;
- -Checking...?
- If x_found_pages > 0 then
- I'm in (select V_APP_PAGES. PAGE_ID
- of V_AUTH_DTL V_AUTH_DTL, V_APP_PAGES V_APP_PAGES
- where V_AUTH_DTL. PAGE_ID! = V_APP_PAGES. PAGE_ID
- and V_AUTH_DTL. USR_ID = x_user_id)
- loop
- insert into T_AUTH_DTL (AUTH_ID, PAGE_ID) values (x_auth_id, i.PAGE_ID);
- end loop;
- end if;
- end;
Please help me to avoid the ERROR "ora-01422" when running code in the dynamic action...
The error is explicit:
ORA-01422: exact fetch returns more than number of lines
Cause: The exact extraction specified number is less than the rows returned.
Action: Rewrite the query or change the number of rows requested
This would imply the query in line 16 as County dissociated in the previous one will always return only one row.
Run
select T_AUTH.ID into x_auth_id from T_AUTH_DTL T_AUTH_DTL,T_AUTH T_AUTH where T_AUTH_DTL.AUTH_ID=T_AUTH.ID and T_AUTH.USR_ID = :x_user_id
in the workshop of SQL by using the P41_USR_ID value in the variable link to find out how many rows it returns.
It is likely that the entire block can be replaced by a single INSERT statement. If you provide instructions CREATE TABLE, INSERT statements to create sample data and a clear definition of the requirements that we try to do.
What is the point of the inclusion of tables aliases that are exactly the same as the names of the tables?
-
I have tried the code
DECLARE
lv_url VARCHAR2 (1000): = ' http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf';
lc_return BLOB;
lhttp_url httpuritype.
Varriables - declared to have written the LOB to pdf file-
l_file UTL_FILE. TYPE_DE_FICHIER;
l_buffer RAW (32767).
l_amount directory: = 32767;
l_pos INTEGER: = 1;
l_blob BLOB;
l_blob_len INTEGER.
BEGIN
-create URIs
lhttp_url: = httpuritype.createuri (lv_url);
-get the PDF document
lc_return: = lhttp_url.getblob ();
-Open the destination file.
l_file: = UTL_FILE. FOPEN ('MBO_INPUT_DIR', 'MBD.zip', 'wb');
-Get the total length of the BLOB
l_blob_len: = DBMS_LOB.getlength (lc_return);
-Pieces of the BLOB to read and write to the file
-full up.
While l_pos < l_blob_len LOOP
DBMS_LOB. READ (lc_return, l_amount, l_pos, l_buffer);
UTL_FILE.put_raw (l_file, l_buffer, FALSE);
l_pos: = l_pos + l_amount;
END LOOP;
-Closes the file.
UTL_FILE. FCLOSE (l_file);
EXCEPTION
WHILE OTHERS THEN
-Close the file if something goes wrong.
IF UTL_FILE.IS_OPEN (l_file) THEN
UTL_FILE. FCLOSE (l_file);
END IF;
LIFT;
END;
But make a mistake like:
Error report-
ORA-29273: HTTP request failed
ORA-06512: at "SYS." UTL_HTTP", line 1130
ORA-12535: TNS:operation expired
ORA-06512: at line 37 level
29273 00000 - "the HTTP request failed.
* Cause: The UTL_HTTP package cannot run the HTTP request.
* Action: Use get_detailed_sqlerrm to check the detailed error message.
Correct the error and restart the HTTP request.
Please suggest a solution. Is it possible to download a zip file with the same code?
[oracle@localhost ~]$ sqlplus scott/tiger SQL*Plus: Release 11.2.0.1.0 Production on Mon Apr 6 13:59:09 2015 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> --My Database version SQL> ---------------------- SQL> SELECT * FROM v$version; BANNER -------------------------------------------------------------------------------- Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production CORE 11.2.0.1.0 Production TNS for Linux: Version 11.2.0.1.0 - Production NLSRTL Version 11.2.0.1.0 - Production SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / DECLARE * ERROR at line 1: ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL) ORA-06512: at line 36 SQL> conn sys as sysdba Enter password: Connected. SQL> ed Wrote file afiedt.buf 1 BEGIN 2 DBMS_NETWORK_ACL_ADMIN.CREATE_ACL(acl => 'love.xml', 3 description => 'Love ACL', 4 principal => 'SCOTT', 5 is_grant => true, 6 privilege => 'connect'); 7 DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(acl => 'love.xml', 8 principal => 'SCOTT', 9 is_grant => true, 10 privilege => 'resolve'); 11 DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL(acl => 'love.xml', 12 host => 'shenzhoufellowship.org'); 13 commit; 14* END; 15 / PL/SQL procedure successfully completed. SQL> conn scott/tiger Connected. SQL> ed Wrote file afiedt.buf 1 DECLARE 2 lv_url VARCHAR2(500) := 'http://shenzhoufellowship.org/main2/files/old/SpecialTopics/TheLoveDare.pdf'; 3 lc_return BLOB; 4 lhttp_url httpuritype; 5 ---Varriables declared for writing the LOB to pdf file -- 6 l_file UTL_FILE.FILE_TYPE; 7 l_buffer RAW(32767); 8 l_amount BINARY_INTEGER := 32767; 9 l_pos INTEGER := 1; 10 l_blob BLOB; 11 l_blob_len INTEGER; 12 BEGIN 13 --create uri 14 lhttp_url := httpuritype.createuri(lv_url); 15 --get the PDF document 16 lc_return := lhttp_url.getblob(); 17 -- Open the destination file. 18 l_file := UTL_FILE.FOPEN('SAUBHIK', 'TheLoveDare.pdf', 'wb'); 19 --Get the total length of the BLOB 20 l_blob_len := DBMS_LOB.getlength(lc_return); 21 -- Read chunks of the BLOB and write them to the file 22 -- until complete. 23 WHILE l_pos < l_blob_len LOOP 24 DBMS_LOB.READ(lc_return, l_amount, l_pos, l_buffer); 25 UTL_FILE.put_raw(l_file, l_buffer, FALSE); 26 l_pos := l_pos + l_amount; 27 END LOOP; 28 -- Close the file. 29 UTL_FILE.FCLOSE(l_file); 30 EXCEPTION 31 WHEN OTHERS THEN 32 -- Close the file if something goes wrong. 33 IF UTL_FILE.IS_OPEN(l_file) THEN 34 UTL_FILE.FCLOSE(l_file); 35 END IF; 36 RAISE; 37* END; 38 / PL/SQL procedure successfully completed. SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@localhost ~]$ cd saubhik/ [oracle@localhost saubhik]$ pwd /home/oracle/saubhik [oracle@localhost saubhik]$ ls -l *.pdf -rw-r--r-- 1 oracle oinstall 60055 Apr 6 14:03 TheLoveDare.pdf [oracle@localhost saubhik]$
I love this pdf file. I would like to read this and mean while if you get an error then please post in its entirety and also think that it is an Oracle error or network.
Maybe you are looking for
-
I get an error message 646 for KB 977304. I am running Vista Home Premium. I tried several times to download it, but without success. Can anyone help?
-
Adding a third drive for HP pavilion e9280t by using the expansion Bay
I would like to add a third sata drive in my Hp Pavilion e9280t, model # AW020AV #ABA for backups using the expansion Bay. However, I have opinions that I need a case of HW for the reader so that it will slide into the expansion Bay housing. What I n
-
Inserted new HP cartridges but the 'Supply levels' tab only shows 50% full?
I use the series HP Deskjet 1050 J410. I nserted the new HP cartridges however "Levels of power" tab only shows 50% full in the user interface. The only reason thati I checked it's so short time because I printed a few pages only black and white, a
-
Software BlackBerry BlackBerry link does not open
I have already uninstalled and reinstalled the program, including cleaning the registry. Error message: "BlackBerry connection stopped working. Details of the problem: Signature of the problem:Problem event name: CLR20r3Signature of the problem 01: B
-
How to push a screen of a Manager
Hello guys, I have a doubt as to the thrust of the newscreen of a Manager? I tried to use norma; way, I have not worked, is this correct? Concerning Rakesh Shankar.P