ORA-01722: invalid number caused with SQL using bind variable
Hi,
Im am hoping that someone can help me resolve a problem thats only just services and is being experienced on quite a few clients.
our application uses C++ exes and makes OCI calls to the database.
what has happened in the last week or so, there has been quite a few invalid number errors being received on a prod server but strangly enough we cannot reproduct the error on our UAT system.
The sql is using bind variables and the information in the trace file shows that a number is being used for the bind variable, here is an extract from one trace file:
for some schemas, the bind variable value is some currupted value, i think:
oacdty=01 mxl=32(21) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1206001 frm=01 csi=178 siz=32 off=0
kxsbbbfp=9a8d62b8 bln=32 avl=03 flg=05
value="Â*d"
but on another schema, the value used is:
Bind#0
oacdty=01 mxl=32(32) mxlc=00 mal=00 scl=00 pre=00
oacflg=03 fl2=1206001 frm=01 csi=178 siz=32 off=0
kxsbbbfp=c5f92718 bln=32 avl=04 flg=05
value="2101"
however both produce invalid number errors.
I am relatively inexperienced as a DBA so would appreciate as much help as i can get.
Could you post your sql statement that is being run.
Also post the query plan from your uat system and the one from your production system (They are likely to be different)
You can export the stats from your production system and run them in your uat system. If you do this, then the execution plans should be the same on both systems(dbms_stats) and if you have the same data you should run into the same problem on uat as in production.
The root cause of this type of problem is having a column in a table which holds values which are of different datatypes. Typically there is a condition in the where clause which indicates that for example only numeric columns should be retrieved from the column which holds multiple data types. However since the optimizer is free to rewrite the query any way it sees fit, (It does not necessarily execute in the order the sql statement is written) it does not filter this data first, and therefore you hit non-numeric data and run into the invalid number error.
You can use little techniques like using an inline view with rownum in the column list, to perform the first filter. This ensures that the inline view is executed on its own, rather than being merged (materialized) with the rest of the query.
A quick temporary solution is to use a comparison like to_char(column_name) = variable
Make sure your comparisons are correct and it doesn't negatively impact on performance of the query
Similar Messages
-
ORA-01722: invalid number error with Bulk collect
Hi ,
I have been using the script to delete old seasonal data from my application DB tables. The stored procedure has been created successfully but when i try to run the proc it has been throwing 'ORA-01722: invalid number' exception at line 'FETCH C1_CUR BULK COLLECT INTO C1_TYPE_VAR LIMIT v_bulklimit;'.
Could you please help me here?
Below is the stored proc:
CREATE OR REPLACE PROCEDURE clean_old_season_data(P_SEASON VARCHAR2) AS
CURSOR C1_CUR IS SELECT ROWID RID,pro.* FROM PROPS pro where pro.ITEMPK IN
(SELECT sve.pk FROM SAVEDVALUEENTRY sve WHERE sve.p_parent IN
(SELECT s.pk FROM SAVEDVALUES s WHERE s.P_MODIFIEDITEM IN
(SELECT a.PK
FROM products a
WHERE a.p_season IN (select s.pk from Seasons s where s.P_code=P_SEASON)
) ) ) and rownum<5;
CURSOR C2_DEL IS SELECT RID FROM PROPS_HISTORY;
TYPE C1_TYPE IS TABLE OF C1_CUR%ROWTYPE;
C1_TYPE_VAR C1_TYPE;
TYPE C2_TYPE IS TABLE OF UROWID;
C2_TYPE_VAR C2_TYPE;
ex_dml_errors EXCEPTION;
PRAGMA EXCEPTION_INIT(ex_dml_errors, -24381);
l_error_count NUMBER;
err_num NUMBER;
err_msg VARCHAR2 (300);
COMMIT_VARIABLE PLS_INTEGER:=0;
v_bulklimit NUMBER:=2;
BEGIN
/*------------------ Data Selection and INSERTION IN HISTORY TABLE ---------------------------------------*/
OPEN C1_CUR;
LOOP
DBMS_OUTPUT.put_line('Cursor opend now in loop');
FETCH C1_CUR BULK COLLECT INTO C1_TYPE_VAR LIMIT v_bulklimit;//ERROR OCCURS HERE
DBMS_OUTPUT.put_line('Cursor count is'|| C1_TYPE_VAR.COUNT);
FORALL I IN 1..C1_TYPE_VAR.COUNT SAVE EXCEPTIONS
INSERT INTO PROPS_HISTORY VALUES C1_TYPE_VAR(I);
COMMIT_VARIABLE := COMMIT_VARIABLE + v_bulklimit;
DBMS_OUTPUT.put_line('Commit variable'|| COMMIT_VARIABLE.COUNT);
IF COMMIT_VARIABLE = v_bulklimit THEN
COMMIT;
COMMIT_VARIABLE := 0;
END IF;
EXIT WHEN C1_CUR%NOTFOUND;
END LOOP;
DBMS_OUTPUT.put_line('Cursor closed now in loop and data inserted in history table');
CLOSE C1_CUR;
/*------------------ Data Selection and DELETION IN Live TABLE ---------------------------------------*/
COMMIT_VARIABLE := 0;
OPEN C2_DEL;
LOOP
FETCH C2_DEL BULK COLLECT INTO C2_TYPE_VAR LIMIT 2;
FORALL I IN 1..C2_TYPE_VAR.COUNT SAVE EXCEPTIONS
DELETE FROM PROPS WHERE ROWID = C2_TYPE_VAR(I);
COMMIT_VARIABLE := COMMIT_VARIABLE + 2;
IF COMMIT_VARIABLE = 2 THEN
COMMIT;
COMMIT_VARIABLE := 0;
END IF;
EXIT WHEN C2_DEL%NOTFOUND;
END LOOP;
CLOSE C2_DEL;
END;Although there are many things which should not have been done in the posted code, I could not find any reason why the Invalid number error should occur at the Fetch clause.
I would suggest you to Insert into Table by providing the Order of Columns i.e. Insert into table (col1, ... colN) values (coll(i).col1...col(i).colN);
I tested below code and it did not give any errors.
drop table test_table;
create table test_Table
rid varchar2(100),
emp_id number(5),
fname varchar2(20),
lname varchar2(50)
set serveroutput on;
declare
cursor c_cur is
select rowid rid, e.*
from employees e
where rownum < 10;
type typ_cur is table of c_cur%rowtype;
typ typ_cur;
l_bulk_limit number := 5;
begin
open c_cur;
loop
fetch c_cur bulk collect into typ limit l_bulk_limit;
dbms_output.put_line('Collection Count :: ' || typ.count);
forall i in 1..typ.count --typ.first..typ.last
insert into test_Table (rid, emp_id, fname, lname) values (typ(i).rid,typ(i).employee_id,typ(i).first_name,typ(i).last_name);
dbms_output.put_line('Processed ' || l_bulk_limit || ' records.');
exit when c_cur%notfound;
end loop;
commit;
end;
select * from test_table;PS:- 1. When you are processing only 4 Records, then why are you breaking them in 2 Loops?
2. Why Commit every time you are processing a DML? Why not maintain an Error Flag and Rollback the Transaction as soon as error is encountered?
3. Use "{code}" (Exclude Double Quotes) to format the code. I am not sure if works.
Regards,
P. -
Getting ORA-01722 - Invalid number error in SQL
I am trying to run a query like
SELECT NVL (ic.industryclassdesc, 'NULL') industryclass,
NVL (hci.updated_by, 'NULL') updatedby,
NVL (hci.operation, 'NULL') operation,
hci.audittimestamp audittimestamp
FROM xxx_company_inxxxx hci, xxx_industry ic
WHERE hci.company_id = 9079496
AND ic.industryclassid = hci.industryclass_id
ORDER BY DECODE (hci.operation, 'D', 'X', hci.operation), hci.audittimestamp
And getting the error - ORA-01722 - Invalid number.
But the columns - ic.industryclassid, hci.industryclass_id and also hci.company_id are 'Number' datatype and also not nullable.
Can anyone suggest a approchSELECT NVL (ic.industryclassdesc, 'NULL')
> industryclass,
NVL (hci.updated_by, 'NULL') updatedby,
NVL (hci.operation, 'NULL') operation,
hci.audittimestamp audittimestamp
xxx_company_inxxxx hci, xxx_industry ic
WHERE hci.company_id = 9079496
AND ic.industryclassid = hci.industryclass_id
BY DECODE (hci.operation, 'D', 'X', hci.operation),
hci.audittimestamp
And getting the error - ORA-01722 - Invalid number.
Do not enter 'String' in the nvl function,if the column is number datatype,
venki
null -
Plz help ...Error on data insert ORA-01722 :invalid number
Hi everybody
I have the strange situation
I tested my code on test database It works well
but when another user want insert new data on the same table on the working database Oracle give message ORA-01722 :invalid number
and then I look to table's structure
On the table my data type that i want insert and table type is same
Plz help ...sriram wrote:
Based on your Input I can give you
ORA-01722: invalid number
Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operationI checked input value and table column type are same Because of i can't understand this error message -
Classic ASP - "ORA-01722: invalid number" using OraOLEDB.Oracle driver
I am working on doing some maintenance updates to a Classic ASP website, and I need to be able to run an insert/update statement for putting values into a lookup table. I am currently running into an "ORA-01722: invalid number" error when trying to use ADO and bind variables for my insert statement.
Below is an example of a table that I am having problems with:
CREATE TABLE "MATMGR"."TEST_SWING_TABLE"
( "TABLE1_ID" NUMBER(4,0) NOT NULL ENABLE,
"TABLE2_ID" NUMBER(4,0) NOT NULL ENABLE,
CONSTRAINT "TEST_SWING_TABLE_PK" PRIMARY KEY ("TABLE1_ID", "TABLE2_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "USERS" ;
Here is some snippet code of the basic functionality I am trying to get to work:
''START CODE''
Dim connDb, cmdDoseInsert
Set connDb = Server.CreateObject("ADODB.Connection")
connDb.CursorLocation = adUseClient ' Setup to return RecordSet
connDb.ConnectionString = "Provider=OraOLEDB.Oracle;Data Source={host};User ID={user id};Password={password}"
connDb.Open()
Set cmdDoseInsert = Server.CreateObject("ADODB.command")
Set cmdDoseInsert.ActiveConnection = connDb
cmdDoseInsert.CommandType = adCmdText
cmdDoseInsert.NamedParameters = true ' Set the command object to use named parameters
cmdDoseInsert.Prepared = true
cmdDoseInsert.CommandTimeout = 0
cmdDoseInsert.CommandText = "INSERT INTO TEST_SWING_TABLE (TABLE1_ID, TABLE2_ID) VALUES (:P_TABLE1_ID, :P_TABLE2_ID)"
cmdDoseInsert.Prepared = true
cmdDoseInsert.Parameters.Append cmdDoseInsert.CreateParameter("P_TABLE1_ID", adNumeric, adParamInput)
cmdDoseInsert.Parameters.Append cmdDoseInsert.CreateParameter("P_TABLE2_ID", adNumeric, adParamInput)
'... START: While Looping
cmdDoseInsert.Parameters(0).Value = {some numeric value}
cmdDoseInsert.Parameters(1).Value = {some numeric value}
cmdDoseInsert.Execute
'... END: Looping
''END CODE''
What I have been able to find out so far is that there is some type of issue with numeric values getting translated right when sending two and retrieving from Oracle in ASP. So, does anyone have any thoughts on how to resolve this as I would like to use parameterized SQL to improve application performance?
I am connecting to a developmental server running Oracle 9.2Ok, in my slightly larger example I found out that for what ever reason my named parameters are not being enforced, and so I had to make sure that the parameters were in the same order as they appeared in the SQL. To be on the save side, I did this when they were added as well as when I was assigning values to them.
Can anyone tell me if this is an Oracle issue or a ASP issue? -
Oracle SQL Developer 1.1.1.25.14, I rror ORA-01722 Invalid Number
I have installed the new version of Oracle SQL Developer 1.1.1.25.14, I use Oracle 9.2. When I browse in the tree of the stored procedures and compile I obtain Error ORA-01722 Invalid Number. The previous version does not give this error. I have tried to change the decimal separator to comma ',' and point '.' but this error always appears.
create or replace
PROCEDURE getAge (
dtmDataStart_in IN DATE,
dtmDataEnd_in IN DATE,
intYears_out OUT NUMBER,
intMonths_out OUT NUMBER,
intDays_out OUT NUMBER) AS
-- Calcola il numero di anni, mesi, giorni intercorsi
-- dalla data iniziale alla data finale.
-- Se la data iniziale è > della data finale, le due date
-- vengono scambiate e le variabili di output vengono ritornate
-- con segno negativo.
--==================================================
-- Data Ultima Modifica: 31/07/98
-- Aggiunta procedura per il calcolo della differenza tra
-- due date dello stesso anno.
--==================================================
-- DICHIARAZIONE VARIABILI INIZIO --------------------------------------------------------
intYMDStart NUMBER(10);
intYMDEnd NUMBER(10);
intYMD NUMBER(10);
intDiffAnni NUMBER(5);
intDiffMesi NUMBER(5);
intDiffGiorni NUMBER(5);
intMeseStart NUMBER(5);
intAnnoStart NUMBER(5);
intTotGiorniMeseStart NUMBER(5);
ysnNegativo NUMBER(5);
-- DICHIARAZIONE VARIABILI FINE ----------------------------------------------------------
BEGIN
intYMDStart := TO_NUMBER( TO_CHAR(dtmDataStart_in,'YYYYMMDD'));
intYMDEnd := TO_NUMBER( TO_CHAR(dtmDataEnd_in,'YYYYMMDD'));
ysnNegativo := 0;
IF intYMDStart = intYMDEnd THEN
intYears_out := 0;
intMonths_out := 0;
intDays_out := 0 ;
ELSE
IF intYMDStart > intYMDEnd THEN
intYMD := intYMDStart;
intYMDStart := intYMDEnd;
intYMDEnd := intYMD;
ysnNegativo := -1;
END IF;
intDiffAnni := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'YYYY')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'YYYY'));
intDiffMesi := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'MM')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'MM'));
intDiffGiorni := TO_NUMBER(TO_CHAR(dtmDataEnd_in,'DD')) - TO_NUMBER(TO_CHAR(dtmDataStart_in ,'DD'));
-- I valori cosi' calcolati di intDiffAnni, intDiffMesi e intDiffGiorni vanno bene
-- ad eccezione dei seguenti casi:
-- Sistemo intDiffAnni
IF (intDiffMesi > 0 OR (intDiffMesi = 0 AND intDiffGiorni >= 0)) THEN
-- intDiffAnni e' OK
intDiffAnni := intDiffAnni;
ELSE
-- non e' ancora arrivato il giorno del compleanno
intDiffAnni := intDiffAnni-1;
END IF;
-- Sistemo intDiffMesi
IF (intDiffMesi > 0 AND intDiffGiorni < 0) THEN
intDiffMesi := intDiffMesi-1;
ELSIF (intDiffMesi < 0 ) THEN
if(intDiffGiorni<0) THEN
intDiffMesi := intDiffMesi+11;
else
intDiffMesi := intDiffMesi+12;
END IF;
ELSIF (intDiffMesi=0 AND intDiffGiorni<0) THEN
intDiffMesi:=11;
END IF;
-- Sistemo intDiffGiorni
-- Calcolo i giorni come (TotGiorniMeseIniziale - GiornoIniziale) + (GiornoFinale - 0)
-- che e' uguale a fare TotGiorniMeseIniziale + (GiornoFinale-GiornoIniziale)
IF intDiffGiorni < 0 THEN
intMeseStart := TO_NUMBER(TO_CHAR(dtmDataStart_in ,'MM'));
IF intMeseStart IN (1,3,5,7,8,10,12) THEN
intTotGiorniMeseStart := 31;
ELSIF intMeseStart = 2 THEN
-- Da enciclopedia: sono bisestili gli anni multipli di 4
-- esclusi i secoli che non sono multipli di 400 (Parte commentata).
intAnnoStart := TO_NUMBER(TO_CHAR(dtmDataStart_in ,'YYYY'));
if (intAnnoStart MOD 4) = 0
-- AND NOT ((intAnnoStart MOD 100) = 0 AND (intAnnoStart MOD 400) <> 0)
Then
intTotGiorniMeseStart := 29;
else
intTotGiorniMeseStart := 28;
end if;
ELSIF intMeseStart IN (4,6,9,11) THEN
intTotGiorniMeseStart := 30;
END IF;
intDiffGiorni := intDiffGiorni + intTotGiorniMeseStart;
END IF;
IF ysnNegativo = 0 THEN
intDays_out := intDiffGiorni;
intMonths_out := intDiffMesi;
intYears_out := intDiffAnni;
ELSE
intDays_out := intDiffGiorni * (-1);
intMonths_out := intDiffMesi * (-1);
intYears_out := intDiffAnni * (-1);
END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END getAge;
The output result of compilation is "GETAGE Compiled", I think the 01722 error is not caused from an sql syntax error, but probably caused from an invalid or unsupported or 'strange' configuration on nationalization... the fact surprises me that the previous version did not give problems
THANKS SO MUTCH
*/ -
SQL*Loader- Records Rejected - Error on table ORA-01722: invalid number
Getting the following errors :
Please tell me where I am going wrong?
Attached is the log file and snippets of datafile along with the control file !!
Also please direct me how can i upload 4900 records at one go?
SQL*Loader: Release 11.1.0.7.0 - Production on Fri Oct 14 03:06:06 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control File: sample.ctl
Data File: Cities.csv
Bad File: Cities.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table CITY, loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
ID FIRST * , CHARACTER
NAME NEXT 35 , ' CHARACTER
COUNTRYCODE NEXT 3 , ' CHARACTER
POPULATION NEXT * WHT CHARACTER
Record 1: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 2: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 3: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 4: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 5: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 6: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 7: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 8: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 9: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 10: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 11: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 12: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 13: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 14: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 15: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 16: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 17: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 18: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 19: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 20: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 21: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 22: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 23: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 24: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 25: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 26: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 27: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 28: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 29: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 30: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 31: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 32: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 33: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 34: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 35: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 36: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 37: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 38: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 39: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 40: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 41: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 42: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 43: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 44: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 45: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 46: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 47: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 48: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 49: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 50: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
Record 51: Rejected - Error on table CITY, column POPULATION.
ORA-01722: invalid number
MAXIMUM ERROR COUNT EXCEEDED - Above statistics reflect partial run.
Table CITY:
0 Rows successfully loaded.
51 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 35840 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 64
Total logical records rejected: 51
Total logical records discarded: 0
Run began on Fri Oct 14 03:06:06 2011
Run ended on Fri Oct 14 03:06:12 2011
Elapsed time was: 00:00:06.18
CPU time was: 00:00:00.03
my control file (sample.ctl):
load data infile 'Cities.csv'
into table city
fields terminated by ','
(id integer external,
name char(35) enclosed by "'",
countrycode char(3) enclosed by "'",
population integer external terminated by '\n'
my datafile (Cities.csv) (it contains 4900 records, but I am showing here just 4 records for ease)
3830,'Virginia Beach','USA',425257
3831,'Atlanta','USA',416474
3832,'Sacramento','USA',407018
3833,'Oakland','USA',399484
Thanks in advance!!Look that when I change a little bit your datafile as follows
1,'Kabul','AFG',1780000
2,'Qandahar','AFG','237500'
3,'Herat','AFG','186800' I got the same error (2 last rows rejected for the same error invalid number)
mhouri > select * from cities;
ID NAME COU POPULATION
1 Kabul AFG 1780000
SQL*Loader: Release 10.2.0.3.0 - Production on Fri Oct 14 10:38:06 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Control File: cities.ctl
Data File: cities.dat
Bad File: cities.bad
Discard File: none specified
(Allow all discards)
Number to load: ALL
Number to skip: 0
Errors allowed: 50
Bind array: 64 rows, maximum of 256000 bytes
Continuation: none specified
Path used: Conventional
Table CITIES, loaded from every logical record.
Insert option in effect for this table: INSERT
Column Name Position Len Term Encl Datatype
ID FIRST * , CHARACTER
NAME NEXT 35 , ' CHARACTER
COUNTRYCODE NEXT 3 , ' CHARACTER
POPULATION NEXT * WHT CHARACTER
Record 4: Rejected - Error on table CITIES, column ID.
Column not found before end of logical record (use TRAILING NULLCOLS)
Record 2: Rejected - Error on table CITIES, column POPULATION.
ORA-01722: invalid number
Record 3: Rejected - Error on table CITIES, column POPULATION.
ORA-01722: invalid number
Table CITIES:
1 Row successfully loaded.
3 Rows not loaded due to data errors.
0 Rows not loaded because all WHEN clauses were failed.
0 Rows not loaded because all fields were null.
Space allocated for bind array: 35840 bytes(64 rows)
Read buffer bytes: 1048576
Total logical records skipped: 0
Total logical records read: 4
Total logical records rejected: 3
Total logical records discarded: 0
Run began on Fri Oct 14 10:38:06 2011
Run ended on Fri Oct 14 10:38:06 2011
Elapsed time was: 00:00:00.23
CPU time was: 00:00:00.09Population value within the data file should be a number
Best regards
Mohamed Houri -
Custom Interface Program Errors out with ORA-01722: invalid number in R12
Hi,
We were upgrading to R12 in which our custom interface load program errors out with "ORA-01722: invalid number". Please find structure of control file as below :
LOAD DATA
APPEND
INTO TABLE RRAT_RCAP_GIO_MAN_ADJ_STG
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED by '"'
TRAILING NULLCOLS
PERIOD_NAME CHAR "ltrim(rtrim(:PERIOD_NAME))"
,SOURCE_TYPE CHAR "ltrim(rtrim(:SOURCE_TYPE))"
,ADJ_ACCOUNT CHAR "ltrim(rtrim(:ADJ_ACCOUNT))"
,USD_NET INTEGER EXTERNAL
,ERROR_CODE CONSTANT 'LOADED DATA'
,PROCESS_FLAG CONSTANT 1
,CREATED_BY "fnd_global.user_id"
,CREATION_DATE sysdate
,LAST_UPDATED_BY "fnd_global.user_id"
,LAST_UPDATE_DATE sysdate
,LAST_UPDATE_LOGIN "fnd_global.login_id"
,REQUEST_ID "fnd_global.conc_request_id"
=====================================Log file ================
Record 1: Rejected - Error on table "XXATORCL"."XXAT_VCAP_GIO_MAN_ADJ_STG", column USD_NET.
ORA-01722: invalid number
===================sample file ==========================
JUL-11,Manual,8213-880011-00000000-259390-1Z-0000-0000,1001
JUL-11,Manual,8213-880011-00000000-253701-1Z-0000-0000,73
==========================================
I had tried with last successfully uploaded file as well which is also now not uploading.
Please help me in this issue.
Thanks,
Piyushi am using R12 now. Please avoide INTEGER EXTERNAL part from the control file. please refer below :
LOAD DATA
APPEND
INTO TABLE RRAT_RCAP_GIO_MAN_ADJ_STG
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED by '"'
TRAILING NULLCOLS
PERIOD_NAME CHAR "ltrim(rtrim(:PERIOD_NAME))"
,SOURCE_TYPE CHAR "ltrim(rtrim(:SOURCE_TYPE))"
,ADJ_ACCOUNT CHAR "ltrim(rtrim(:ADJ_ACCOUNT))"
,USD_NET
,ERROR_CODE CONSTANT 'LOADED DATA'
,PROCESS_FLAG CONSTANT 1
,CREATED_BY "fnd_global.user_id"
,CREATION_DATE sysdate
,LAST_UPDATED_BY "fnd_global.user_id"
,LAST_UPDATE_DATE sysdate
,LAST_UPDATE_LOGIN "fnd_global.login_id"
,REQUEST_ID "fnd_global.conc_request_id"
====================
Srini,
Just one thing i want to explain you that previously it was working fine but suddenly (might after upgrading in R12) started giving error. I had tested with old data files also which were loaded successfully in the system. but now it is giving error. Please help me in this issue.
Regards, -
ORA-01722: invalid number while using TO_CHAR function.
Hi All,
I was using this query from around past 1 year and everything was working fine.
select to_char ( '2012/12/23','YYYY/MM/DD') from dual;
how ever from monday onwards , this is returning me with the following error.
ORA-01722: invalid number
The NLS_DATE_FORMAT is DD-MON-RR in my oracle 11g version.
Please help me regarding this.Your date is in literal & your intended format so no need to format it again.
select to_char ( '2012/12/23','YYYY/MM/DD') from dual;
same as
select '2012/12/23' from dual;I don't know your need so same code to work!!!
select to_char(to_date('2012/12/23','YYYY/MM/DD'),'DD/MM/YYYY') from dualsunnymoon wrote:
where vale for ? is coming as '2011/12/23' from java.
the whole application has to be changed and retested.
>
It it comes as a text convert it to date TO_DATE('2011/12/23','YYYY/MM/DD') to use in comparison operators like =, != , > , < etc. Comparison operators used taking date as literal will give you wrong result.
Better to do it right even it takes huge effort.
Edited by: Lokanath Giri on ३ जनवरी, २०१२ १२:०६ अपराह्न -
Hello,
I have a ten relational data modeler. When I export a reporting scheme I get the following error:
java.sql.BatchUpdateException: ORA-01722: invalid number
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10296)
at oracle.jdbc.driver.OracleStatementWrapper.executeBatch(OracleStatementWrapper.java:216)
at oracle.dbtools.crest.exports.reports.RSTables.export(RSTables.java:108)
at oracle.dbtools.crest.exports.reports.RSRelationalModel.export(RSRelationalModel.java:28)
at oracle.dbtools.crest.exports.reports.ReportsHandler.export(ReportsHandler.java:123)
at oracle.dbtools.crest.swingui.ControllerApplication$ExportToReportsSchema$1.run(ControllerApplication.java:2055)
Will I could help with the error?
Logical data modeler is exported correctly
Thanks.Hi,
I've logged a bug on this.
It seems likely that the problem has arisen because one of your tables has a non-integer value for one of its volumetric properties (Minimum, Expected or Maximum volume).
(If this is the case, then the problem will probably still occur with the DM 4.1 EA1 version.)
David -
Error Message - ORA-01722 Invalid Number
Hello:
I have the following situation. When I create an organization, a record is inserted into the following table, AGREEMENTS, and populates four fields.
I have an update form which selects the organization from the AGREEMENTS table so the user can populate the rest of the table. In addition, on this form, there is a drop-down box which allows the user to select the name of a legal document along with the version of the document in which the user needs to select. This select list is created via an LOV joining three tables. The item name for this select list is :P6_DOCUMENT.
The code for the LOV is:
SELECT S.DOC_NAME||' - '|| O.VERSION_NO AS DOC, O.ORG_DOC_CURR_KEY
FROM SUPPORTING_DOCS S,
ORG_DOC_CURR_VER O,
AGREEMENTS H
WHERE
S.DOC_TYPE = 'HISA'
AND S.SUPPORTING_DOC_KEY = O.SUPPORTING_DOC_KEY
AND H.ORG_KEY_LE = O.ORG_KEY
AND O.ORG_KEY=:P6_ORG_KEY_LEWhen the user completes the form, the SUBMIT process is a PL/SQL block consisting of an UPDATE statement to update the AGREEMENTS table based on the selected organization and an INSERT statement to insert a record into the AGREEMENTS_DOC table to store the value stored in :P7_DOCUMENT.
Ok, now here is where my problem starts.
When I first bring up the form and I select the organization I want to update, I click the Search button to find the organization and I receive the following error message: ORA-01722 Invalid Number.
At this point all I'm doing is a basic search. There is no insert/update or anything going on. I'm not understanding why I would be receiving this error message.
The search is based on the database column ORG_KEY_LE whose datatype is NUMBER.
In my application, the item assigned to ORG_KEY_LE is P6_ORG_KEY_LE.
I have a PL/SQL block process created (On Load-Before Header) in the Page Rendering area of my page definition. The PL/SQL code that is written is:
BEGIN
IF :P6_SEARCH_ORG != '0' THEN
:P6_ORG_KEY_LE := :P6_SEARCH_ORG;
END IF;
END;I then have an Item created, :P6_SEARCH_ORG, which is a Select List. In the LOV portion of the page for this item, I have the following:
select ORG_KEY_LE display_value, ORG_KEY_LE return_value
from AGREEMENTS
order by 1The reason for using this table is because this table contains the newly created organization which needs to be updated with the remaining columns of data.
I then have a Search button in the Button area which has the following settings:
Button Position: Region Template Position #CHANGE#.
Condition Type: Value of Item in Express 1 is NULL.
Expression 1: :P6_ORG_KEY_LE.
To troubleshoot this problem, I created two pages, one page to do the UPDATE and the second page to do the INSERT.
The SEARCH functionality in both pages are identical.
When I run my UPDATE page, which only involves updating the missing fields, the process works. I have my search box, I'm able to search for the organization, make my updates, and I'm good.
When I run my INSERT page, which involves inserting the record with the assigned document, I receive the error message after I click the SEARCH button. In order to INSERT the record into this table, I first need to SELECT the organization that was UPDATED in the AGREEMENTS table (using the UPDATE page described in above paragraph). When I select the organization, the user can then assign the appropriate legal document to the organization and insert the record into the AGREEMENTS_DOC table.
Can someone help me with this error message? I'm not sure why I am able to perform my SEARCH on a page with the UPDATE statement, not able to perform the SEARCH on the page with my INSERT statement, and not be able to perform the SEARCH on the page that combines the UPDATE and INSERT statements.
I did some more troubleshooting and I do believe my SUBMIT process which contains the INSERT statement is the issue. I created a fourth page which doesn't have a SUBMIT process. I brought up the form, searched for my organization and the information for that organization appeared. The problem is definately with my UPDATE/INSERT process.
The PL/SQL block for the Submit process is the following:
BEGIN
update
MDD.HISA_AGREEMENTS
set
LAST_UPDATED_BY=V('APP_USER'),
APPROVER_SALUTATION=:P6_APPROVER_SALUTATION,
APPROVER_FIRST_NAME=:P6_APPROVER_FIRST_NAME,
APPROVER_MIDDLE_INITIAL=:P6_APPROVER_MIDDLE_INITIAL,
APPROVER_LAST_NAME=:P6_APPROVER_LAST_NAME,
APPROVER_NAME_SUFFIX=:P6_APPROVER_NAME_SUFFIX,
APPROVER_EMAIL_ADDR=:P6_APPROVER_EMAIL_ADDR,
SPONSOR_EMAIL_ADDR=:P6_SPONSOR_EMAIL_ADDR,
APPROVER_TITLE=:P6_APPROVER_TITLE
where
ORG_KEY_LE=:P6_ORG_KEY_LE
INSERT INTO
HISA_AGREEMENT_DOCS
(HISA_AGREEMENT_DOC_KEY,
ORG_KEY_LE,
APPLICATION_KEY,
STATUS,
STATUS_DATE,
CREATED_BY,
ORG_DOC_CURR_KEY)
VALUES
(HISA_AGREEMENT_DOC_KEY_SEQ.NEXTVAL,
:P6_ORG_KEY_LE,
:P6_APPLICATION_KEY,
'C',
SYSDATE,
V('APP_USER'),
:P6_DOCUMENT)
END;There is something wrong with the above statement and I do not understand what it could be. Can someone help?
Thanks for the help.Hi,
I believe you are on to something.
The select list for item :P6_DOCUMENT appears when I first bring up the form. When I select my organization and receive the error message, I clicked on the Session in the Developer's bar. The value in item/field :P6_DOCUMENT shows %null%.
This is the path in which my user would like to accomplish her task:
1. Select an organization
2. Display the information for that organization from the AGREEMENTS table
3. Enter the data for the remaining fields in the AGREEMENTS table
4. Select the document (:P6_DOCUMENT) from the drop-down.
5. Click Submit
6. Update the AGREEMENTS table with data entered in #3.
7. Insert a record into the AGREEMENTS_DOC table with the selection from #4.
Somehow I need the :P6_DOCUMENT field not to show the %null% during the SEARCH functionality. I think that is causing the problem.
How do I fix this? -
Microsoft Access shows "ORA-01722: Invalid number"
Hi,
I have seen a previous post on this problem, but none of the tips applied to my situation, so I'm asking again.
I'm accesing Oracle 8i Personal (German Version) with Access 2002 (latest SP, on a computer with Windows 2000). Please note that I installed the latest ODBC driver from Oracle (8.1.7.6.0). When I create a table which has, say, a NUMBER(10,3) field in it, and I link it into Access using the ODBC driver, I cannot enter numbers like "1,23" into the table. The error "ORA-01722: Invalid number" is shown and the INSERT fails. If I enter the numbers like "1.23", the resulting field value is "123". The
problem occurs, whether I use the table view, a form or VBA via ADO. Pass-Through queries (over ADO's QueryDef facility) work, however. The decimal separator is "," in both Windows and Oracle. With normal NUMBER fields everything works fine.
When looking at the SQL log it turns out, that Access hands out a string to the ODBC driver and relies on the driver to convert it to a number. Regardless of the locale set in Windows, Access uses the dot ('1.23') as decimal separator for this string. The German version of oracle wants a comma as decimal separator as in "INSERT INTO TEST VALUES ('1,23')". From a previous post I know that ODBC specifies that all numbers must use the dot, regardless of the locale setting. So it turns out, the Oracle ODBC driver is causing the problem, not Access. But, anyway, this problem could easily be fixed by adding a "Workaround option" to the ODBC driver, that always converts dots in numbers to commas before handing it out to the backend. Another option would be, that the ODBC driver does this decision automatically by asking the backend, which separator it wants.
Any comments greatly appreciated.
Best regards
MarkusThis is actually a duplicate of bug# 1938991 which says:
"A 'Numeric settings' option has been added to the Application Options page of the ODBC Configuration screen so that the user can choose what numeric settings will be used in receiving and returning numeric data that is bound as strings. This option allows the user to choose Oracle NLS settings (the default setting and the behavior in former releases), Microsoft default regional settings (to provide a way to mirror the Oracle OLE DB driver's behavior for greater interoperability) and US numeric settings, which are necessary when using MS Access or DAO in non-US environments. In this case, setting the Numeric settings to US settings should resolve the issue, since DAO is expecting the data in US format."
Apparently the fixed release is 9.2.0.2, 9.0.1.4 or 8.1.7.7 depending on your client version. -
Hi guys
We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
the container tries to update them. They deploy without error though.
See below for the stack trace
We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
runs on w2k, and Oracle on Solaris 7.
Extract from set-environment:
SET DB_CLASSPATH=
SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
SET
SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
.2\db\oracle816\event;
Extract from weblogic.properties:
weblogic.jdbc.connectionPool.commercePool=\
url=jdbc:weblogic:oracle,\
driver=weblogic.jdbc.oci.Driver,\
I made a few experiments, and I noticed that generating the CMP classes
(with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
Here is what I mean : ejbc uses the library
c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
with SP10. However since that change and after rebuilding our jars, all CMP
entity beans fail to update.
If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
and without changing anything else, our CMP beans work fine. I did not
change any driver or xml deployment descriptor.
One of the generated files in the jar (for our bean
VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
cause of the problem.
I jadded that class and here is a difference I notice:
OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
(BigDecimal)resultset.getObject(5);
NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
= resultset.getBigDecimal(5, 35);
Similar differences for the SETbigdecimal.
Dunno if that will help, but I'm attaching the 2 jar files with explicit
names.
Damn that was long, I hope someone will read it... Thanks for any help on
this, see stack trace attached below
Nicolas Lejeune
Stack trace:
mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
non-transactional EJB invoke:
java.rmi.UnexpectedException: Unexpected exception in
com.b2boost.visibility.VisibilityBean.getVisibilityId():
java.sql.SQLException: ORA-01722: invalid number
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
at
weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
47)
at
com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
Logic_CMP_RDBMS.java:446)
at
com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
ogic_CMP_RDBMS.java:376)
at
weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
at
weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
a:227)
at
weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
a:355)
at
weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
at
com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
Impl.java:198)
at
com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
stVisibilityRequestPC.java:83)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
eExecutorImpl.java:193)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
ipelineExecutorImplEOImpl.java:56)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
at
com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
.java:170)
at
com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
:102)
at
com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
409)
at
com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
:156)
at
com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
n(B2boostPortalDestinationDeterminer.java:208)
at
com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
[Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
[Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
I notice that you have
bin/oci815_8
oracle816
Thsi looks liek the inconsistency in your environment.
What you need to do is
1. find oci817_8 and place that in the PATH.
2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
Try this and see if it helps.
BTW - WLS 5.1 is EOL -
Recieving ORA-01722 invalid number error while creating a materialized view
Hi,
I am receiving a ORA-01722 invalid number error while creating a materialized view. when run the select statement of the view i don't get any error, but when i use the same select statement to create a materialized view i receive this error. Could any please help in resolving this error. Here is the code i am using to create a materialized view.
CREATE MATERIALIZED VIEW MV_EBS_CH_CLOSED
REFRESH FORCE ON DEMAND
AS
SELECT DISTINCT kr.request_id, org.org_unit_name,
ebs_ch_ticket_type (kr.request_id) ticket_type,
DECODE
(kr.status_code,
'CLOSED_SUCCESS', kr.last_update_date,
'IN_PROGRESS', (SELECT MAX (start_time)
FROM ebs_ch_datastore ecd1
WHERE kr.request_id = ecd1.request_id
AND workflow_step_name =
'Final BA Review and Deployment Exit Criteria')
) closed_date,
substr(krhd.visible_parameter12,1,10) siebel_start_date,
kr.creation_date itg_start_date
FROM kcrt_requests kr,
kcrt_request_types krt,
kcrt_req_header_details krhd, kcrt_request_details krd1,
(SELECT koum.user_id user_id,
DECODE (koup.org_unit_name,
'IT Implementations', 'CHS - Service Management BA',
koup.org_unit_name
) org_unit_name
FROM krsc_org_unit_members koum, krsc_org_units koup
WHERE 1 = 1
AND 'Y' = koup.enabled_flag
AND koum.org_unit_id = koup.org_unit_id
AND EXISTS (
SELECT 'X'
FROM krsc_org_units kouc
WHERE koup.org_unit_id = kouc.org_unit_id
START WITH kouc.parent_org_unit_id =
ANY (SELECT org_unit_id
FROM krsc_org_units krsc_org_units1
WHERE 'Clearinghouse' =
org_unit_name)
CONNECT BY kouc.parent_org_unit_id =
PRIOR kouc.org_unit_id)
UNION
SELECT kou.manager_id user_id,
DECODE
(kou.org_unit_name,
'IT Implementations', 'CHS - Service Management BA',
kou.org_unit_name
) org_unit_name
FROM krsc_org_units kou
WHERE 'Y' = kou.enabled_flag
START WITH kou.parent_org_unit_id =
(SELECT org_unit_id
FROM krsc_org_units krsc_org_units2
WHERE 'Clearinghouse' = org_unit_name)
CONNECT BY kou.parent_org_unit_id = PRIOR kou.org_unit_id) org
WHERE krt.request_type_id = kr.request_type_id
AND krt.request_type_name IN ('Bug Fix', 'IT Enhancement')
and kr.REQUEST_ID = krd1.request_id
and krd1.batch_number = 1
AND kr.request_id = krhd.request_id
AND org.user_id in (krd1.parameter4, krd1.parameter5, krd1.parameter7)
AND ( 'CLOSED_SUCCESS' = kr.status_code
OR 'IN_PROGRESS' = kr.status_code
AND kr.request_id IN (
SELECT request_id
FROM (SELECT DISTINCT request_id,
MAX
(start_time)
closed_date
FROM ebs_ch_datastore
WHERE 'Final BA Review and Deployment Exit Criteria' =
workflow_step_name
GROUP BY request_id))
Thanks,
Shaik MohiuddinThis error occurs when you try to create a materialized view , but if you run the sql the results are perfectly fine. Well it happend to me also and to fix this I made sure all the coulmns have the same data type which are used in joins or in where clause.
use
where
to_number(col1)=to_number(col2) and to_number(col3)=to_number(col4)
hope this helps.. -
ORA-01722: Invalid number - error only in Oracle 10g?
While trying to insert a numeric value into a decimal column, I get this error. Hitherto, my update statements used to look fine.
Can anyone let me know if this enforcement is specific to Oracla 10g? I am running :
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Thanks in advance for your help!
NiranjanWell, you've a blank space which isn't a number, that's why you have an error.
Please see the following example to have a default value :
SQL> create table tutu (id number, text varchar2(10));
Table created.
SQL> alter table tutu modify id default 0;
Table altered.
SQL> insert into tutu values (' ', 'NoWork');
insert into tutu values (' ', 'NoWork')
ERROR at line 1:
ORA-01722: invalid number
SQL> insert into tutu values (null,'NullValue');
1 row created.
SQL> insert into tutu (text) values ('Default');
1 row created.
SQL> insert into tutu values (1,'NonDefault');
1 row created.
SQL> select * from tutu;
ID TEXT
NullValue
0 Default
1 NonDefault
SQL> Nicolas.
Message was edited by:
N. Gasparotto
Maybe you are looking for
-
I have a windows computer. How can I create apps and put them on itunes?
I have a windows computer. How can I create apps and put them on itunes?
-
Business Intelligence folder not able to see,
Hi All, I have installed the Enterprise Portal 7.0. only on server. I am trying the intergation of the BI system in portal. I am not able to see the "Business Intelligence" folder under Portal Content>Portal Content(brower)>Content Provided by SAP>pl
-
Network apps crashing after 10.4.7 update
Several apps that access Network functions are now crashing on my TiBook. I was running the update and I tried plugging in my new phone via USB... when I did that my system crashed. I worry that may have f'd up my system. I'm yet to try to reinstall
-
Hacker posing as MobileMe sending out old files?
A shared file file just appeared in my Sent folder that came from files.me.com, which was MobileMe. It looks like it was sent from me to me, but it doesn't appear in my inbox. MobileMe is defunct, how did this happen? Have I been hacked? How can I
-
Hi I'm migrate from MS SQL 2005 to Oracle 11g using SQL Developer V3.0.04 Trying to use the batch file migration.bat. Found the documentation with migration -help=guide Every action I start results in the SQLException below: D:\oracle\product\sqldeve