select to_char('10','10')
from dual
This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL
why? pls help
Answer Posted / mohammad islam
The format is to_char('10','0,999.99')
or to_char(10,'0,999.99')
What is the meaning of it? It means 10 has to be 4 digit
long number with comma after the first digit and 2 digit
decimal places
like 0,010.00
But for to_char('10','0999.99'), the result would be
0010.00 because 4 digit before the decimal place with no
comma and 2 digit after the decimal place
And for TO_CHAR(1230,'00,999.99'), the result is
01,230.00(as you see 5 digit before decimal and 2 digit
after decimal and comma after 2 digit.
I hope it will clear everything
Thanks,
Mohammad Islam
| Is This Answer Correct ? | 13 Yes | 1 No |
Post New Answer View All Answers
does the query needs a hint to access a materialized view?
> CREATE OR REPLACE FUNCTION FACTORIAL_1(factstr varchar2 ) 2 RETURN NUMBER AS 3 new_str VARCHAR2(4000) := factstr||'*' ; 4 fact number := 1 ; 5 BEGIN 6 7 WHILE new_str IS NOT NULL 8 LOOP 9 fact := fact * TO_NUMBER(SUBSTR(new_str,1,INSTR(new_str,'*')-1)); 10 new_str := substr( new_str,INSTR(new_str,'*')+1); 11 END LOOP; 12 13 RETURN fact; 14 15 END; explanation Above program?
What are set operators?
Explain the different normalization forms?
How to list all tables in your schema?
What is a cursor and what are the steps need to be taken?
State the various uses of dbcc command?
How to export several tables together?
What are the set operators union, union all, minus & intersect meant to do?
How to change user password in oracle?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
What privilege is needed for a user to delete rows from tables in another schema?
How to display row numbers with the records?
What is the simplest tool to run commands on oracle servers?
How to export data with a field delimiter?