ORA-01722 PL/SQL: numeric string or the error value
Hi people;I have an error with this request:
SELECT SEQ_ENTITE.nextval, ENT_CODE_ENT, ENT_GPL_ID, TO_NUMBER('2012')+1,
pkg_etl_fdx.f_getseqexe('LPG_TYE', 'TYE_CODE_CON', ENT_CODE_TEN, 'TYE_SEQ', TO_NUMBER('2012')),
ENT_LIB_ENT, ENT_SEUIL, 'O', 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, ENT_CODE_UNI, ENT_CODE_MERE, ENT_IND_FIN, 0,
0, 0, ENT_NIVEAU, ENT_CODE_TEN, CHAR_TO_LABEL('EXERCICE', 'PUB:EXE'||TO_NUMBER('2012')+1||':'), OLS_GRP
FROM ENTITE
WHERE ENT_OLS_EXE = TO_NUMBER('2012');
How to fix the PL/SQL ORA-01722: numeric value or error string?The description of the entity table:
desc entite
Nom NULL Type
------------- -------- -----------------
ENT_SEQ NOT NULL NUMBER(38)
ENT_CODE_ENT NOT NULL VARCHAR2(6 CHAR)
ENT_GPL_ID NOT NULL NUMBER(10)
ENT_OLS_EXE NOT NULL NUMBER(38)
ENT_TYE_SEQ NUMBER(38)
ENT_LIB_ENT VARCHAR2(40 CHAR)
ENT_SEUIL NUMBER(3)
ENT_AUTO_DEP VARCHAR2(1 CHAR)
ENT_TOT_REP FLOAT(126)
ENT_TREC_VEN FLOAT(126)
ENT_TREC_INT FLOAT(126)
ENT_RPT_ANT FLOAT(126)
ENT_TOT_VEN FLOAT(126)
ENT_CUM_REP FLOAT(126)
ENT_CREC_INT FLOAT(126)
ENT_CRPT_ANT FLOAT(126)
ENT_CCRE_RCU FLOAT(126)
ENT_TOT_ENG FLOAT(126)
ENT_TOT_FAC FLOAT(126)
ENT_TDEP_INT FLOAT(126)
ENT_TOT_DEM FLOAT(126)
ENT_TOT_RES FLOAT(126)
ENT_CODE_UNI VARCHAR2(6 CHAR)
ENT_CODE_MERE VARCHAR2(6 CHAR)
ENT_IND_FIN VARCHAR2(1 CHAR)
ENT_TOT_ATT FLOAT(126)
ENT_CUM_ATT FLOAT(126)
ENT_CUM_REA FLOAT(126)
ENT_NIVEAU NUMBER(1)
ENT_CODE_TEN VARCHAR2(2 CHAR)
OLS_EXERCICE NUMBER(10)
OLS_GRP NUMBER(10)
Thank you.
select 'PUB:EXE'|| to_char(TO_NUMBER('2012')+1 )||':' from dual
Kind regards
Gena
Tags: Database
Similar Questions
-
Problem with error ORA-06502: PL/SQL: numeric string or the error value
Hello
I use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.
ORA-06502: PL/SQL: numeric string or the error valueSD wrote:
HelloI use a loop for the coil just out of data using 'dbms_output.put_line' and I get this error after a few records. I've been using and it happens at a different interval. He would have to do with the length of the question, I am trying to spool? Thank you.
ORA-06502: PL/SQL: numeric string or the error value
Yes, it's a mistake to dependent data.
Manage: SD
Status level: Beginner
Join date: November 21, 2001
Messages total: 289
Total Questions: 189 (183 pending)Why wasting you time here when you get rarely answers your questions?
-
ORA-06502: PL / SQL: numeric or value error: character string buffer too small
Dear friends,
We have a package customized for FTP PLSQL.
I get ORA-06502: PL/SQL: digital or value error: character string buffer too small when the FTP service running.
The FTP function call the HOST function that is in fact to launch the above mentioned error.
Here is the code for FTP and HOST functions.FUNCTION HOST(text_in IN VARCHAR2, result_out IN OUT VARCHAR2) RETURN BOOLEAN IS ret boolean; drun boolean; hid number; BEGIN dbms_output.put_line('host1 begin'); ret := HOST(text_in,result_out,hid,drun,1); if not drun then dbms_output.put_line('not derun'); return false; end if; dbms_output.put_line('after if'); return ret; END HOST;
FUNCTION GET_ENV(env IN VARCHAR2) RETURN VARCHAR2 IS res boolean; out varchar2(256); BEGIN res := HOST('echo '||env,out); return out; END GET_ENV;
FUNCTION HOST(text_in IN VARCHAR2, result_out IN OUT VARCHAR2, hostid IN OUT NUMBER , demrunning IN OUT boolean, maxlines IN NUMBER DEFAULT NULL) RETURN BOOLEAN IS tempid number; tempstat varchar2(10); n number; m number; retry number; mult number; timestamp_date date; lv_result_out varchar2(200); BEGIN --result_out := NULL; --fcxh76 demrunning := true; dbms_output.put_line('host2 begin'); select XXAR_SHELL_CMD_S.nextval into tempid from dual; hostid := tempid; dbms_pipe.pack_message(tempid); n := dbms_pipe.send_message('CMD'); dbms_pipe.pack_message(abs(maxlines)); dbms_pipe.pack_message(rtrim(text_in)); n := dbms_pipe.send_message ('CMD'||rtrim(to_char(tempid)),0); m := dbms_pipe.receive_message('CMDSTAT'||rtrim(to_char(tempid)),5); if m = 1 then demrunning := false; dbms_output.put_line('m=1'); result_out := 'ERROR : GLCC0005 presumed not running'; dbms_output.put_line('result_out - '||result_out); return FALSE; elsif m = 0 then dbms_pipe.unpack_message(tempstat); end if; if tempstat = 'ERROR' then dbms_output.put_line('tempstat = ERROR'); result_out := NULL; dbms_output.put_line('after result out'); return FALSE; end if; <<CHECK_AGAIN>> m := dbms_pipe.receive_message('RSLT'||rtrim(to_char(tempid)),0); if m <> 0 then goto CHECK_AGAIN; end if; if m = 0 then dbms_pipe.unpack_message(result_out); dbms_pipe.purge('RSLT'||rtrim(to_char(tempid))); return TRUE; else result_out := 'ERROR : Call to GLCC0006 failed'; return FALSE; end if; END HOST;
Here is the PLSQL block that I will carry out and also the output on this blockFUNCTION FTP (program_name in VARCHAR2, source_file in VARCHAR2, dest_file in VARCHAR2 default NULL) RETURN BOOLEAN AS fd utl_file.file_type; res boolean; res1 boolean; out varchar2(256); out1 varchar2(256); ftp_dnsname varchar2(50); ftp_user varchar2(50); ftp_pass varchar2(50); ftp_pre_opt varchar2(150); ftp_post_opt varchar2(150); ftp_override varchar2(150); destination_file varchar2(50); ftp_command varchar2(2000); ftp_main varchar2(2000); proc_id varchar2(10); fderr varchar2(100); rec varchar2(1024); temp_buf varchar2(100); base_source varchar2(100); log_dir varchar2(100) := get_env('$APPLCSF')||'/log'; fndc_logfile_dir varchar2(100) := 'FNDC_LOGFILE_DIR'; i number ; ftp_tried boolean; begin ftp_tried := false; dbms_output.put_line('begin'); for ftp_rec in ( select attribute1, attribute2, attribute3, attribute4, nvl(attribute5,' ') attribute5, nvl(attribute6,' ') attribute6, nvl(rtrim(attribute7),'put') attribute7 from fnd_flex_values where flex_value_set_id in (select flex_value_set_id from fnd_flex_value_sets where flex_value_set_name = 'CPC_FTPS' ) and flex_value like program_name ) LOOP dbms_output.put_line('Looping'); ftp_tried := true; ftp_dnsname := ftp_rec.attribute1; ftp_user := ftp_rec.attribute2; ftp_pass := ftp_rec.attribute3; destination_file := ftp_rec.attribute4; if dest_file is not null then destination_file := dest_file; end if; if destination_file is null then destination_file := base_name(source_file); end if; ftp_pre_opt := ftp_rec.attribute5; ftp_post_opt := ftp_rec.attribute6; ftp_override := lower(ftp_rec.attribute7); dbms_output.put_line('host'); res := HOST('echo $$',proc_id); dbms_output.put_line('proc_id - '||proc_id); dbms_output.put_line('after host'); base_source := rtrim(base_name(source_file)); dbms_output.put_line('host 1'); res := HOST('> '||log_dir||'/ftpcmd.'||proc_id || ' ; chmod 777 '||log_dir||'/ftpcmd.'||proc_id,out1); dbms_output.put_line('host 2'); res := HOST('> '||log_dir||'/ftpmain.'||proc_id || ' ; chmod 777 '||log_dir||'/ftpmain.'||proc_id,out1); dbms_output.put_line('host 3'); res := HOST('> '||log_dir||'/ftplog.'||proc_id || ' ; chmod 777 '||log_dir||'/ftplog.'||proc_id,out1); dbms_output.put_line('host completed'); ...... ...... ......
Output:declare lv_ftp_result boolean; begin lv_ftp_result := u.FTP('XXAR_REV_PA', ' ' || '/u07/app/qaoa083a/data/outgoing/xxar/PARECREV' || '/' || 'REVENUE_20120319014318.dat','REVENUE_20120319014318.dat'); IF lv_ftp_result THEN dbms_output.put_line('True'); ELSE dbms_output.put_line('False'); END IF; exception when others then dbms_output.put_line('in exception - '||sqlerrm); end;
The flow of execution goes like this:host1 begin host2 begin m=1 result_out - ERROR : GLCC0005 presumed not running not derun begin Looping host host1 begin host2 begin m=1 in exception - ORA-06502: PL/SQL: numeric or value error: character string buffer too small
1 FTP function called from PL/SQL block
2 inside of the FTP service, the Sub statement calls the HOST function
3. This HOST function in turn calls another function of overloaded HOST (code shown above).log_dir varchar2(100) := get_env('$APPLCSF')||'/log';
4. in the function overloaded with the HOST, the following statements are executed successfully, and FALSE is returned by the function
5. the remaining code in the FTP service is running and the HOST function is called again using the Sub statementdbms_output.put_line('m=1'); result_out := 'ERROR : GLCC0005 presumed not running'; dbms_output.put_line('result_out - '||result_out);
6.again, this HOST function in turn calls another function of overloaded HOST (code posted above).res := HOST('echo $$',proc_id);
7. this time, in the function overloaded host, ORA-06502 is thrown when the following statement is executed and the execution stops here that this exception is unhandled.
This statement is very successfully in the previous call to the function of HOST (step 4), but it fails now.result_out := 'ERROR : GLCC0005 presumed not running';
Any idea on why this error occurs in this scenario? Because the issue of memory?
DB Info:
Kind regardsOracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production PL/SQL Release 11.2.0.1.0 - Production
Anthony
Published by: Anthony Alix on March 20, 2012 08:53Hello
HOST (1) calls the function of MODERATOR (2) with his second parameter as result_out
The first time you call the function of host (1) in the function get_env you use
... out varchar2(256); BEGIN res := HOST('echo '||env,out); ...
out is big enough varchar2 (256)
The second time you call (1) HOST of the FTP function as:
... ftp_main varchar2(2000); proc_id varchar2(10); fderr varchar2(100); ... ... res := HOST('echo $$',proc_id); dbms_output.put_line('proc_id - '||proc_id); ...
Here, use you proc_id which is varchar2 (10)
And it's not big enough!
Kind regards
Peter
-
Hello!
I have a simple object type and a proecdure in which I am trying to use it to insert into another table
-object
CREATE ORREPLACETYPEmt_mtg ASOBJECT
(
ACOL NUMBER ,
BCOL NVARCHAR2 (100)
);
CREATE ORREPLACETYPEREF_MTG ASTABLEOFMt_MTG ;
-same structure as the use of sampletbl target table in the cursor query
create table tbl_MT_MTG
(
ACOL NUMBER ,
BCOL NVARCHAR2 (100)
);
-procedure
CREATE ORREPLACEINTERIORTEST_PROCEDURE1
AS
ref_cur sys_refcursor ;
REFR ref_mtg ;
BEGIN
OPEN ref_cur FOR
Select acol,
BCOL
DE sampletbl où rownum<10;
Fetch ref_cur in bulk collectintorefr;
Insert intotbl_MT_MTG(acol,bcol)selectacol,bcol fromtable(refr);
commit;
CLOSE Ref_cur;
END;
/
When I run this procedure fails with
ORA-06504: PL/SQL: return variables of the game results or the query types do not match
ORA-06512: at "TEST_PROCEDURE1", line 10
ORA-06512: at line 2
Any help on this please...
Thanks to an OLD POST below
so perfect helped me! Thank you
Tubby
After 5 years of more :-)
How to store refcursor in collection How to store refcursor in collection
-
Unexpected ' digital or the error value "when you use CAST COLLECT
I have a problem with string using CAST aggregation / COLLECT and function to_string described on various sites around the net, including AskTom and http://www.oracle-developer.net/display.php?id=306.
I get "digital or value error: character string buffer too small", but cannot see what limit I'm exceeding.
I implemented a simple test case to highlight this problem I pasted below.
The error does not come from the function to_string itself (otherwise, I expect that we would see "TO_STRING threw an exception" in the error message that is returned).
Popular thoughts,
Thank you, Andy
SQL*Plus: Release 10.1.0.4.2 - Production on Tue Jun 15 09:56:53 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> CREATE TYPE table_of_varchar2 AS TABLE OF VARCHAR2(32000); 2 / Type created. SQL> CREATE OR REPLACE FUNCTION to_string ( 2 nt_in IN table_of_varchar2 3 , delimiter_in IN VARCHAR2 DEFAULT ',') 4 RETURN VARCHAR2 5 IS 6 l_idx PLS_INTEGER; 7 l_str VARCHAR2(32767); 8 l_dlm VARCHAR2(10); 9 10 BEGIN 11 12 l_idx := nt_in.FIRST; 13 WHILE l_idx IS NOT NULL LOOP 14 l_str := l_str || l_dlm || nt_in(l_idx); 15 l_dlm := delimiter_in; 16 l_idx := nt_in.NEXT(l_idx); 17 END LOOP; 18 19 RETURN l_str; 20 EXCEPTION 21 WHEN OTHERS THEN 22 raise_application_error(-20000 23 , 'TO_STRING raised an exception. '|| 24 'The reported error was: '||sqlerrm); 25 END to_string; 26 / Function created. SQL> DECLARE 2 l_longstring varchar2(32000); 3 BEGIN 4 SELECT to_string(CAST( COLLECT( substr(object_name,1,1) ) AS table_of_varchar2 ) ) 5 INTO l_longstring 6 FROM all_objects 7 WHERE rownum < 2001; 8 9 EXCEPTION 10 WHEN OTHERS THEN 11 raise_application_error(-20001 12 , 'The anonymous block raised an exception: '|| 13 sqlerrm||'. '||DBMS_UTILITY.format_error_backtrace); 14 END; 15 / PL/SQL procedure successfully completed. SQL> DECLARE 2 l_longstring varchar2(32000); 3 BEGIN 4 SELECT to_string(CAST( COLLECT( substr(object_name,1,1) ) AS table_of_varchar2 ) ) 5 INTO l_longstring 6 FROM all_objects 7 WHERE rownum < 2002; 8 9 EXCEPTION 10 WHEN OTHERS THEN 11 raise_application_error(-20001 12 , 'The anonymous block raised an exception: '|| 13 sqlerrm||'. '||DBMS_UTILITY.format_error_backtrace); 14 END; 15 / DECLARE * ERROR at line 1: ORA-20001: The anonymous block raised an exception: ORA-06502: PL/SQL: numeric or value error: character string buffer too small ORA-06512: at line 1. ORA-06512: at line 1 ORA-06512: at line 4 ORA-06512: at line 11
Hi André,.
You have reached the limit of VARCHAR2 in SQL, which is 4000. The concatenated string is much longer. You get an even more informative error message if you deposit 20 to 24 lines in the to_string function.
Kind regards
Rob. -
ORA-01722: invalid number when you use the function TO_CHAR.
Hi all
I was using this query closely for 1 year and it worked fine.
Select to_char (' 2012/12/23 ', ' DD/MM/YYYY') twice;
How ever from Monday onwards it's me back with the following error.
ORA-01722: invalid number
The NLS_DATE_FORMAT is DD-MON-RR in my version of oracle 11g.
Please help me with this.They should compare these values as values of date instead of under the form of strings. TO_DATE should be used instead of TO_CHAR.
Published by: Saran on January 2, 2012 23:00
-
How do the secret string to the number value
Hello
I want to convert the string to a number value
ex: -.
Select col from t1 where p1 = '232';
the query above returns as a value below
'123,343,534,433';
I have to pass the value in another query where condition as below
Select * from t2 where in p2 (123,343,534,433);
P2 is here the number data type,
and I want to take each coma has a distinct value
Thanks in advance...
BalaAnother way
SQL> select * 2 from emp 3 where INSTR(','||'7900,7902'||',' , ','||empno||',' ) > 0 4 / EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- 7900 JAMES CLERK 7698 03-DEC-81 950 30 7902 FORD ANALYST 7566 03-DEC-81 3000 20
SS
-
While developer version 4.0.1.14 sql connection I get the error message
Set of süden today morning when connecting sql developer, I get the following error
To perform the requested operation, an error has occurred:
() oracle.jdbc.driver.T2CConnection.getLibraryVersionNumber I have
0 vendor ID
Help, please
Problem was the automatic change of type tns connection. Somehow, she had moved from network alias to connect identified and because of that, I was getting error. I changed to alias network and gave the names of tns and it worked.
-
PL/SQL loop to find the minimum value
I want to find the minimum value from a table using the pl/sql loop
I have data format below.
1 ABC 2
1 ABC 20
1 ABC 500
1 ABC 2000
XYZ 2 250
JKL 3 300
MNP 3 350
3 KLM 400
I wrote the code below. His does not work. Please suggest.
Set serveroutput on
declare
x number: = 3;
y VARCHAR2 (3): = 'ABC ';
fmin number: = 0;
number of Fmax: = 0;
Start
for rec in (select sal from test
where id = name and x = y) loop
If rec.sal > fmin then
fmin: = rec.sal;
on the other
FMAX: = rec.sal;
fmin: = fmax.
end if;
end loop;
dbms_output.put_line (Fmax);
end;
/I want to output 2 on top of code.
Thanks in advance
Why PL/SQL? SELECT MIN (SAL) OF TEST will be more rapid and much less coding. In any case:
declare
number of v_min_sal;
Start
for v_rec in a loop (select sal from emp)
If nvl (v_min_sal, v_rec.sal + 1) > v_rec.sal
then
v_min_sal: = v_rec.sal;
end if;
end loop;
dbms_output.put_line (' lowest salaray is "' |") v_min_sal | '"');
end;
/
The lowest Salaray is "800".
PL/SQL procedure successfully completed.
SQL >
SY.
-
Find sql stmt in which the error occurred
Hi, I've been accounting application in which some action was causing an error in unique constraint violated. If I find the declaration of origin of the error and I have enabled tracing for this session of sql and converted to a format readable by using TKPROF.
It shows the list of the sql stmts but how to find the stmt that caused the error.
Is there any other way to find?If you have:
ERROR #5:err=1 tim=2045165
search for 'PARSING IN CURSOR #5' (#
is the number of cursor in the trace file): PARSING IN CURSOR #5 len=26 dep=0 uid=5 oct=2 lid=5 tim=20451242745 hv=2976344882 ad='3be614ac' insert into t(x) values(1) END OF STMT PARSE #5:c=171601,e=270693,p=0,cr=10,cu=0,mis=1,r=0,dep=0,og=1,tim=20451242738
Edited by: P. Forstmann June 6, 2011 14:02
-
SQL: How to get the maximum value of loans
I have to display cod_acct_no, amt_disbursed, bal_book in table LOAN_MAST and maximum version of table LOAN_SCHEDULE CTR_STAGE_NO amt_instal. in other words; amt_instal of the most ctr_stage_no of table LOAN_SCHEDULE to display with the other value of LOAN_MAST column.
You could help me pls.
Data from these two tables are provided below:
Main table ready
Table of loan from schedule+:INSERT INTO loan_mast VALUES ('00057110000431 ',2000000,1010605.39) / INSERT INTO loan_mast VALUES ('00057110000291 ',3500000,1212038.57) / INSERT INTO loan_mast VALUES ('00057110000450 ',2000000,1179199.79) / INSERT INTO loan_mast VALUES ('00057010001457 ',2000000,1555836.32) / INSERT INTO loan_mast VALUES ('00057010001650 ',9500000,8060419.1) / INSERT INTO loan_mast VALUES ('00057110050065 ',2000000,1742388.45) / INSERT INTO loan_mast VALUES ('00057010001947 ',2000000,1933540.07) / INSERT INTO loan_mast VALUES ('00057110050213 ',2000000,1978588.06) / INSERT INTO loan_mast VALUES ('00037010001104 ',6175000,3241694.48) / INSERT INTO loan_mast VALUES ('00037010001766 ',12000000,11715781.01) / INSERT INTO loan_mast VALUES ('00037300050025 ',7500000,7472981.78) / INSERT INTO loan_mast VALUES ('00037210000694 ',6500000,6588648.16) / INSERT INTO loan_mast VALUES ('00017210000087 ',5000000,4105246.38) / INSERT INTO loan_mast VALUES ('00017210000129 ',5000000,3478303.49) / INSERT INTO loan_mast VALUES ('00017210000141 ',5000000,3685293.79) / INSERT INTO loan_mast VALUES ('00017210000246 ',5000000,4029883.61) / INSERT INTO loan_mast VALUES ('00017210000268 ',5000000,4499322.1) / INSERT INTO loan_mast VALUES ('00017210000322 ',5000000,4966885.32) / INSERT INTO loan_mast VALUES ('00017300050014 ',7000000,6625970.85) / INSERT INTO loan_mast VALUES ('00017300050036 ',5700000,5687617.61) / INSERT INTO loan_mast VALUES ('00017300050047 ',7500000,7527560) / INSERT INTO loan_mast VALUES ('00017240000050 ',4300000,4300000) / INSERT INTO loan_mast VALUES ('00017210000449 ',7000000,7000000) / INSERT INTO loan_mast VALUES ('03017180001733 ',500000,335164.83) / INSERT INTO loan_mast VALUES ('01117110050071 ',700000,625123.9) / INSERT INTO loan_mast VALUES ('01077300050011 ',1500000,1447149.08) / INSERT INTO loan_mast VALUES ('00927180002119 ',500000,441488.25) / INSERT INTO loan_mast VALUES ('01507150051043 ',700000,633340.47) / INSERT INTO loan_mast VALUES ('03317290050040 ',300000,273601.45) / INSERT INTO loan_mast VALUES ('01027150051360 ',200000,179240.42) / INSERT INTO loan_mast VALUES ('01067150052782 ',300000,270794.1) / INSERT INTO loan_mast VALUES ('01137110050082 ',2000000,1786359.87) / INSERT INTO loan_mast VALUES ('01107150050610 ',200000,191399.56) / INSERT INTO loan_mast VALUES ('01117150051071 ',300000,271560.17) / INSERT INTO loan_mast VALUES ('01017210001052 ',6800000,6609837.58) / INSERT INTO loan_mast VALUES ('01157010001078 ',450000,425069.61) / INSERT INTO loan_mast VALUES ('00017180001173 ',700000,484447.94) / INSERT INTO loan_mast VALUES ('09997120004696 ',93099,64369.52) / INSERT INTO loan_mast VALUES ('01067010001654 ',285000,255579.7) / INSERT INTO loan_mast VALUES ('01017210001063 ',7000000,6930746) / INSERT INTO loan_mast VALUES ('01017210001105 ',7000000,6934246) / INSERT INTO loan_mast VALUES ('01017210001138 ',7000000,7000000) / INSERT INTO loan_mast VALUES ('01017210001116 ',7000000,7000000) / INSERT INTO loan_mast VALUES ('01017210001161 ',7000000,7000000) / INSERT INTO loan_mast VALUES ('01017210001150 ',7000000,7000000) / INSERT INTO loan_mast VALUES ('01017210001127 ',7000000,6930746) / INSERT INTO loan_mast VALUES ('00067110050043 ',700000,602416.77) / INSERT INTO loan_mast VALUES ('01147150052362 ',200000,178682.78) / INSERT INTO loan_mast VALUES ('01167150051647 ',75000,60057.01) / INSERT INTO loan_mast VALUES ('01017150053252 ',150000,125205.66) / INSERT INTO loan_mast VALUES ('00917150050232 ',100000,91972.04) / INSERT INTO loan_mast VALUES ('01017180003081 ',990000,663015.26) / INSERT INTO loan_mast VALUES ('09997220000893 ',154160,138665.08) / INSERT INTO loan_mast VALUES ('01017210000955 ',5000000,4510523.32) / INSERT INTO loan_mast VALUES ('00087150001049 ',1000000,904601.41) / INSERT INTO loan_mast VALUES ('01107010000288 ',300000,268703.55) / INSERT INTO loan_mast VALUES ('00087150001038 ',1000000,906085.9) / INSERT INTO loan_mast VALUES ('01107010000277 ',200000,184905.75) / INSERT INTO loan_mast VALUES ('00017080050030 ',500000,450047.42) / INSERT INTO loan_mast VALUES ('00037210000533 ',4000000,3346908.17) / INSERT INTO loan_mast VALUES ('01117180000631 ',990000,712874.67) / INSERT INTO loan_mast VALUES ('02007180001216 ',990000,792437.11) / INSERT INTO loan_mast VALUES ('01957180000928 ',400000,320317.9) / INSERT INTO loan_mast VALUES ('00037210000544 ',600000,518404.4) / INSERT INTO loan_mast VALUES ('01117110050060 ',1000000,893034.07) / INSERT INTO loan_mast VALUES ('00037180001877 ',800000,640405) / INSERT INTO loan_mast VALUES ('01047150052651 ',320000,288850.72) / INSERT INTO loan_mast VALUES ('01027160050103 ',100000,79915.86) / INSERT INTO loan_mast VALUES ('01067150052759 ',150000,129601.15) / INSERT INTO loan_mast VALUES ('01057150051287 ',800000,723681.12) / INSERT INTO loan_mast VALUES ('03317290050021 ',400000,359312.25) / INSERT INTO loan_mast VALUES ('01157150051316 ',500000,452300.73) / INSERT INTO loan_mast VALUES ('00037150050598 ',700000,633221.03) / INSERT INTO loan_mast VALUES ('01047150052673 ',150000,129610.95) / INSERT INTO loan_mast VALUES ('01147150052384 ',400000,361840.54) / INSERT INTO loan_mast VALUES ('01067150052802 ',150000,130840.94) / INSERT INTO loan_mast VALUES ('01157150051338 ',300000,259202.22) / INSERT INTO loan_mast VALUES ('01057150051307 ',400000,361840.54) / INSERT INTO loan_mast VALUES ('00017110050160 ',500000,397640.38) / INSERT INTO loan_mast VALUES ('01077150050910 ',100000,79915.86) / INSERT INTO loan_mast VALUES ('00057150050702 ',400000,360841.83) / INSERT INTO loan_mast VALUES ('01017150053271 ',150000,119955.86) / INSERT INTO loan_mast VALUES ('01057150051329 ',400000,360029.85) / INSERT INTO loan_mast VALUES ('01067150002665 ',500000,452300.73) / INSERT INTO loan_mast VALUES ('01077150050921 ',250000,225526.17) / INSERT INTO loan_mast VALUES ('00047150050693 ',200000,160494.64) / INSERT INTO loan_mast VALUES ('01077080050026 ',100000,91150.55) / INSERT INTO loan_mast VALUES ('01017150053293 ',150000,129675.2) / INSERT INTO loan_mast VALUES ('09997040001950 ',2500000,2439161.01) / INSERT INTO loan_mast VALUES ('09997120004685 ',75000,51855.74) /
Kind regardsINSERT INTO loan_schedule VALUES ('00017080050030 ',1,12426.29) / INSERT INTO loan_schedule VALUES ('00017110050160 ',1,0) / INSERT INTO loan_schedule VALUES ('00017110050160 ',2,17702.2) / INSERT INTO loan_schedule VALUES ('00017180001173 ',1,0) / INSERT INTO loan_schedule VALUES ('00017180001173 ',2,35116.22) / INSERT INTO loan_schedule VALUES ('00037150050598 ',1,0) / INSERT INTO loan_schedule VALUES ('00037150050598 ',2,18158.39) / INSERT INTO loan_schedule VALUES ('00037180001877 ',1,0) / INSERT INTO loan_schedule VALUES ('00037180001877 ',2,29122.98) / INSERT INTO loan_schedule VALUES ('00037210000533 ',1,0) / INSERT INTO loan_schedule VALUES ('00037210000533 ',2,144609.59) / INSERT INTO loan_schedule VALUES ('00037210000544 ',1,0) / INSERT INTO loan_schedule VALUES ('00037210000544 ',2,17625) / INSERT INTO loan_schedule VALUES ('00047150050693 ',1,0) / INSERT INTO loan_schedule VALUES ('00047150050693 ',2,7331.21) / INSERT INTO loan_schedule VALUES ('00057150050702 ',1,0) / INSERT INTO loan_schedule VALUES ('00057150050702 ',2,10157.38) / INSERT INTO loan_schedule VALUES ('00067110050043 ',1,20017.91) / INSERT INTO loan_schedule VALUES ('00087150001038 ',1,0) / INSERT INTO loan_schedule VALUES ('00087150001038 ',2,25940.56) / INSERT INTO loan_schedule VALUES ('00087150001049 ',1,0) / INSERT INTO loan_schedule VALUES ('00087150001049 ',2,25940.56) / INSERT INTO loan_schedule VALUES ('00917150050232 ',1,2937.5) / INSERT INTO loan_schedule VALUES ('00927180002119 ',1,0) / INSERT INTO loan_schedule VALUES ('00927180002119 ',2,25083.02) / INSERT INTO loan_schedule VALUES ('01017150053252 ',1,5422.86) / INSERT INTO loan_schedule VALUES ('01017150053271 ',1,0) / INSERT INTO loan_schedule VALUES ('01017150053271 ',2,5422.86) / INSERT INTO loan_schedule VALUES ('01017150053293 ',1,0) / INSERT INTO loan_schedule VALUES ('01017150053293 ',2,4406.25) / INSERT INTO loan_schedule VALUES ('01017180003081 ',1,0) / INSERT INTO loan_schedule VALUES ('01017180003081 ',2,49664.37) / INSERT INTO loan_schedule VALUES ('01017210000955 ',1,0) / INSERT INTO loan_schedule VALUES ('01017210000955 ',2,126967.14) / INSERT INTO loan_schedule VALUES ('01027150051360 ',1,0) / INSERT INTO loan_schedule VALUES ('01027150051360 ',2,5980.03) / INSERT INTO loan_schedule VALUES ('01027160050103 ',1,0) / INSERT INTO loan_schedule VALUES ('01027160050103 ',2,3615.24) / INSERT INTO loan_schedule VALUES ('01047150052651 ',1,0) / INSERT INTO loan_schedule VALUES ('01047150052651 ',2,8125.9) / INSERT INTO loan_schedule VALUES ('01047150052673 ',1,0) / INSERT INTO loan_schedule VALUES ('01047150052673 ',2,4406.25) / INSERT INTO loan_schedule VALUES ('01057150051287 ',1,0) / INSERT INTO loan_schedule VALUES ('01057150051287 ',2,20752.45) / INSERT INTO loan_schedule VALUES ('01057150051307 ',1,0) / INSERT INTO loan_schedule VALUES ('01057150051307 ',2,10376.23) / INSERT INTO loan_schedule VALUES ('01057150051329 ',1,0) / INSERT INTO loan_schedule VALUES ('01057150051329 ',2,11960.05) / INSERT INTO loan_schedule VALUES ('01067010001654 ',1,0) / INSERT INTO loan_schedule VALUES ('01067010001654 ',2,6855.16) / INSERT INTO loan_schedule VALUES ('01067150002665 ',1,0) / INSERT INTO loan_schedule VALUES ('01067150002665 ',2,12970.28) / INSERT INTO loan_schedule VALUES ('01067150052759 ',1,0) / INSERT INTO loan_schedule VALUES ('01067150052759 ',2,4406.25) / INSERT INTO loan_schedule VALUES ('01067150052782 ',1,0) / INSERT INTO loan_schedule VALUES ('01067150052782 ',2,7618.03) / INSERT INTO loan_schedule VALUES ('01067150052802 ',1,0) / INSERT INTO loan_schedule VALUES ('01067150052802 ',2,5422.86) / INSERT INTO loan_schedule VALUES ('01077080050026 ',1,0) / INSERT INTO loan_schedule VALUES ('01077080050026 ',2,2485.26) / INSERT INTO loan_schedule VALUES ('01077150050910 ',1,0) / INSERT INTO loan_schedule VALUES ('01077150050910 ',2,3615.24) / INSERT INTO loan_schedule VALUES ('01077150050921 ',1,0) / INSERT INTO loan_schedule VALUES ('01077150050921 ',2,6348.36) / INSERT INTO loan_schedule VALUES ('01077300050011 ',1,0) / INSERT INTO loan_schedule VALUES ('01077300050011 ',2,23289.97) / INSERT INTO loan_schedule VALUES ('01107010000277 ',1,0) / INSERT INTO loan_schedule VALUES ('01107010000277 ',2,4550.62) / INSERT INTO loan_schedule VALUES ('01107010000288 ',1,0) / INSERT INTO loan_schedule VALUES ('01107010000288 ',2,7215.96) / INSERT INTO loan_schedule VALUES ('01107150050610 ',1,5188.12) / INSERT INTO loan_schedule VALUES ('01117110050060 ',1,0) / INSERT INTO loan_schedule VALUES ('01117110050060 ',2,23528.29) / INSERT INTO loan_schedule VALUES ('01117110050071 ',1,0) / INSERT INTO loan_schedule VALUES ('01117110050071 ',2,16469.8) / INSERT INTO loan_schedule VALUES ('01117150051071 ',1,7782.17) / INSERT INTO loan_schedule VALUES ('01117180000631 ',1,0) / INSERT INTO loan_schedule VALUES ('01117180000631 ',2,49664.37) / INSERT INTO loan_schedule VALUES ('01137110050082 ',1,0) / INSERT INTO loan_schedule VALUES ('01137110050082 ',2,47056.57) / INSERT INTO loan_schedule VALUES ('01147150052362 ',1,5875) / INSERT INTO loan_schedule VALUES ('01147150052384 ',1,0) / INSERT INTO loan_schedule VALUES ('01147150052384 ',2,10376.23) / INSERT INTO loan_schedule VALUES ('01157010001078 ',1,0) / INSERT INTO loan_schedule VALUES ('01157010001078 ',2,10764.62) / INSERT INTO loan_schedule VALUES ('01157150051316 ',1,0) / INSERT INTO loan_schedule VALUES ('01157150051316 ',2,12970.28) / INSERT INTO loan_schedule VALUES ('01157150051338 ',1,0) / INSERT INTO loan_schedule VALUES ('01157150051338 ',2,8812.5) / INSERT INTO loan_schedule VALUES ('01167150051647 ',1,2711.43) / INSERT INTO loan_schedule VALUES ('01507150051043 ',1,0) / INSERT INTO loan_schedule VALUES ('01507150051043 ',2,18158.39) / INSERT INTO loan_schedule VALUES ('01957180000928 ',1,0) / INSERT INTO loan_schedule VALUES ('01957180000928 ',2,14561.49) / INSERT INTO loan_schedule VALUES ('02007180001216 ',1,0) / INSERT INTO loan_schedule VALUES ('02007180001216 ',2,36039.68) / INSERT INTO loan_schedule VALUES ('03017180001733 ',1,0) / INSERT INTO loan_schedule VALUES ('03017180001733 ',2,25083.02) / INSERT INTO loan_schedule VALUES ('03317290050021 ',1,0) / INSERT INTO loan_schedule VALUES ('03317290050021 ',2,9833.81) / INSERT INTO loan_schedule VALUES ('03317290050040 ',1,0) / INSERT INTO loan_schedule VALUES ('03317290050040 ',2,7375.36) / INSERT INTO loan_schedule VALUES ('09997040001950 ',1,0) / INSERT INTO loan_schedule VALUES ('09997040001950 ',2,13864.94) / INSERT INTO loan_schedule VALUES ('09997120004685 ',1,0) / INSERT INTO loan_schedule VALUES ('09997120004685 ',2,3495.59) / INSERT INTO loan_schedule VALUES ('09997120004696 ',1,0) / INSERT INTO loan_schedule VALUES ('09997120004696 ',2,4339.15) / INSERT INTO loan_schedule VALUES ('09997220000893 ',1,0) / INSERT INTO loan_schedule VALUES ('09997220000893 ',2,3429.21) /
YamenHello
When there is a WHERE clause, it always comes after the FROM clause. (Joints and their conditions are part of the FROM clause).
Try this:WITH got_rnum AS ( SELECT cod_acct_no , amt_instal , ROW_NUMBER () OVER ( PARTITION BY cod_acct_no ORDER BY ctr_stage_no DESC ) AS rnum FROM loan_schedule ) SELECT m.cod_acct_no, m.amt_disbursed, m.bal_book , r.amt_instal AS high_amt_instal FROM loan_mast m JOIN got_rnum r ON r.cod_acct_no = m.cod_acct_no AND r.rnum = 1 WHERE m.cod_acct_stat = '8' ----------[this is condition is newly added to apply the same in production to fetch desired record] ;
-
How to find the sql query by using the hash value
Hello
DBVERSION: 9.2.0.8
I generated the statspack report and I want to see total request and I hash_value here.
in v$ sql can't see all querys... .pls suggest me other ways...
Thank you
Srini...Have you seen Peter's response? There is no installation other than that would be to store the history of the IMO. Another reason that you must pass to 10g or 11g better, now.
Aman...
-
Dynamic SQL query to get the unique value of list in a column
I have two tables: tblWorkers and tblSkills. tblWorkers has a column, skills, which is populated by a field of multiple-checkbox with one or more skill_IDs of tblSkills, so each tblWorkers.Skills consists of a list of one or more comma-delimited values. For any Skill_ID, I need to generate a list of all workers with the appropriate skills, so I tried to do something in the direction of SELECT WorkerName FROM tblWorkers WHERE IN of skills (skills, #FORM. Skill_ID #)... or WHERE skills (ListFind (skills, #FORM. Skill_ID #))... etc.? My results (once I have had data type mismatches of the road) return all workers, not just those with the desired skills. There must be an easy way to do... How people with a little more experience CF/SQL I do this?> each tblWorkers.Skills consists of a list of one or more comma-delimited values
This is your problem. You store a list of values that you want to access power/query separately in a single column. You will have to burst in a separate table.
TblWorkersTblSkills
TblWorkerSkills
mapping table of many workers with skills.If you do not change your data model now, you will constantly be butting your head against that.
-
SQL * Loader - rejected records - error on table ORA-01722: invalid number
Get the following errors:
Please tell me where I'm wrong?
The log file and extracts the data file with the control file is attached.
Also guide me please how I can download 4900 files at once?
-------------------------------------
SQL * Loader: release 11.1.0.7.0 - Production on Fri 14 Oct 03:06:06 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Control file: sample.ctl
Data file: Cities.csv
Bad leadership: Cities.bad
Discard File: none is specified
(Allow all releases)
Number of loading: ALL
Number of jump: 0
Authorized errors: 50
Link table: 64 lines, maximum of 256000 bytes
Continuation of the debate: none is specified
Path used: classics
Table CITY, loaded from every logical record.
Insert the option in effect for this table: INSERT
Column Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
FIRST ID *, CHARACTER
35. ACCORDING TO NAME, ' CHARACTER
COUNTRYCODE 3, ' CHARACTER
THE NEXT POPULATION * CHARACTER WHT
Sheet 1: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 2: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 3: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Folder 4: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 5: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 6: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 7: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 8: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 9: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Case 10: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Factsheet 11: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 12: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 13: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 14: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 15: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 16: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 17: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 18: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
File 19: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 20: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 21: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Account 22: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 23: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record number of 24: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 25: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 26: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Fact sheet 27: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 28: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 29: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 30: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record of 31: rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
• Statement 32: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 33: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 34: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 35: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 36: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 37: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 38: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 39: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 40: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 41: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 42: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 43: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Sheet 44: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 45: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
• Statement 46: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 47: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 48: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 49: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Page 50: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
Record 51: Rejected - error on the table CITY, POPULATION column.
ORA-01722: invalid number
NUMBER of MAXIMUM ERRORS EXCEEDED - above the statistics reflect partial performance.
CITY table:
0 rows successfully loaded.
51 lines not filled due to data errors.
0 rows not loading because all WHEN clauses were failed.
0 rows not populated because all fields are null.
The space allocated to bind table: 35840 bytes (64 lines)
Bytes of read buffer: 1048576
Total logical records ignored: 0
Total logical records read: 64
Total rejected logical records: 51
Total logical records ignored: 0
Run started on Fri 14 Oct 03:06:06 2011
Run finished Fri Oct 14 03:06:12 2011
Time was: 00:00:06.18
Time processor was: 00:00:00.03
----------------------------------------------------------------------
my control file (sample.ctl):
Load data infile 'Cities.csv '.
in the town of table
fields completed by «,»
(external id integer,
char (35) name box by ' ', '
CountryCode tank (3) box by ' ', '
external population integer terminated by '\n '.
)
my data (Cities.csv) file (it contains 4900 documents, but I show 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!Watch when I have a little change your database as follows
1,'Kabul','AFG',1780000 2,'Qandahar','AFG','237500' 3,'Herat','AFG','186800'
I got the same error (last 2 rows rejected for the same number invalid error)
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.09
Value of the population within the data file must be a number
Best regards
Mohamed Houri
-
ORA-01722: invalid number in SQL Loader
Hi all
CREATE TABLE SAMPL_TABLE
(
ITEM_CATEGORY VARCHAR2 (30 BYTES),
ITEM_NO VARCHAR2 (240 BYTES),
ITEM_DESCRIPTION VARCHAR2 (240 BYTES),
CLIENT_NAME VARCHAR2 (240 BYTES),
CUSTOMER_NO VARCHAR2 (240 BYTES),
VALID_AMOUNT_MONTH1 NUMBER,
VALID_UNITS_MONTH1 NUMBER,
VALID_BUDGET_AMOUNT_MONTH1 NUMBER,
VALID_BUDGET_UNITS_MONTH1 NUMBER,
ATTRIBUTE1 VARCHAR2 (240 BYTES),
ATTRIBUT2 VARCHAR2 (240 BYTES),
NUMBER OF VALID_RATE
);
Control file
Options (Errors = 10000, Skip = 3)
DOWNLOAD THE DATA
INFILE ' / home/appltest/Sheet1.csv'
BADFILE "sample.bad."
DISCARDFILE 'sample.dsc '.
REPLACE
IN THE TABLE sampl_table
fields completed by «,»
surrounded of possibly "" "
trailing nullcols
(
client_name TANK NULLIF client_name = BLANKS "RTRIM(:customer_name)."
customer_no NULLIF CHAR customer_no = BLANKS "RTRIM(:customer_no)."
item_no NULLIF TANK item_no = BLANKS "RTRIM(:item_no)."
valid_amount_month1 "to_number (: valid_amount_month1, '999,999,999.99')."
valid_units_month1 "to_number (substr (: valid_units_month1, instr(:valid_units_month1,'$') + 1), '999,999,999.99')."
valid_budget_units_month1 "to_number (: valid_budget_units_month1, '999,999,999.99')."
valid_budget_amount_month1 "to_number (trim (substr (: valid_budget_amount_month1, instr(:valid_budget_amount_month1,'$') + 1)), '999,999,999.99')."
valid_rate NULLIF CHAR valid_rate = BLANKS 'RTRIM(:valid_rate) '.
)
Sheet1.csv
Name of the cust Cust #. Article no. Item Desc Category Amount – month 1 Units - month 1 Act early Act early Budget - months 1 Budget - unit - months 1 Rate Name of the cust Cust #. Article no. Item Desc Category Amount – month 1 Units - month 1 Act early Act early Budget - months 1 Budget - unit - months 1 Rate Name of the cust Cust #. Article no. Item Desc Category Amount – month 1 Units - month 1 Act early Act early Budget - months 1 Budget - unit - months 1 Rate REYNU 1001 ABC001 ABC Renyu ABC 82 61 1 REYNU1 1028 ABC123 ABCRenyu123 ABC 295 1469 1 REYNU2 1028 ABC344 ABC Renyu 344 ABC 2270 6335 1 Get error below
Sheet 1: Rejected - error on the table SAMPL_TABLE, column VALID_RATE.
ORA-01722: invalid number
Sheet 2: Rejected - error on the table SAMPL_TABLE, column VALID_RATE.
ORA-01722: invalid number
Sheet 3: Rejected - error on the table SAMPL_TABLE, column VALID_RATE.
ORA-01722: invalid number
Sheet 1: Rejected - error on the table SAMPL_TABLE, column VALID_AMOUNT_MONTH1 .
ORA-01722: invalid number
Sheet 2: Rejected - error on the table SAMPL_TABLE, column VALID_AMOUNT_MONTH1 .
ORA-01722: invalid number
Sheet 3: Rejected - error on the table SAMPL_TABLE column VALID_AMOUNT_MONTH1
ORA-01722: invalid number
Can you help me please?
Oracle Database 11 g Enterprise Edition Release 11.1.0.7.0 - 64 bit Production
Hello
No sign of setting shaped or ' $' is seen in the data, which is the reason why I guess you used the conversions in the * ctl file.
What is the problem with this symbol $ in the code?
No problem with the ' $'-what I mean is that it is not necessary.
Looking for him "$" field and exclude it from your text/number (SUBSTR) and if there is no "$" in your file, this additional training is not mandatory - why clutter up your code with unnecessary functions?
Regarding the error you get, it is related to the format mask, you provide:
Message #20:
Select to_number (substr (146, instr(146,'$') + 1), '999,999,999.99') of double
o/p: 146
Select to_number (substr (1469, instr(1469,'$') + 1), '999,999,999.99') of double
Error: ORA-01722: invalid number
1. you must use "146" (text) and no 146 (number).
2. ' 146' works because it "fits" the format mask you supplied: 999 999,999. 99. " but '1469' does not like the format mask expects one ',' as the delimiter of thousands, that is, "1 469'."
Select to_number (substr (1, 469', instr('1,469','$') + 1), '999,999,999.99') twice;
Similarly, in the #22 Post:
to_number (substr (' 752,3308', instr ('752.3308', ' $') + 1), 999, 999 999,99') of double
4 decimals are consistent with the format DP 2 mask.
Simply remove all masks of format.
Maybe you are looking for
-
Memory problems (/ questions/967643)
FIrefox uses 1 gig RAM + with almost nothing running.
-
Hi team, I just install windows 7 edition integral and peripheral Bluetooth windows 8.1 is not be detectable, when I search for problem that I came across this PCI data acquisition and Signal Processing controller driver is missing and a unknown devi
-
Dear all, especialy Lenovo representative Currently, I bought Lenovo Y700-15ISK with that 256SSD only, as I use my existed 2 TB internal HARD drive. Try to install mantioned above disk HARD in the laptop I found that for versions SSD Lenovo does not
-
How to remove all separated WinRAR files
Original title: teach me how to remove all the separate files Because of the first time I use the WinRAR, I try to separate a file, but I put the wrong size of file to separate. After that, it separate for 300540 files, so can someone show me how to
-
HP Installer for 10.8.2
I have set up my Photosmart Plus B209a problems on my wireless network. My router does not function WPS and the Setup Wizard I was built to slow Leopard, and so does not work properly. There is a new version available for download that will focus on