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
What is an index associated with a constraint?
What are the advantages of oracle 12c?
How to connect the oracle server as sysdba?
How would you begin to troubleshoot an ORA-3113 error?
What are the ways tablespaces can be managed and how do they differ?
How to rename an existing table?
What are the uses of synonyms?
what are archived logs?
Explain a synonym?
What are the different types of modules in oracle forms?
What are the oracle built-in data types?
What are the attributes of cursor?
What privilege is needed for a user to delete rows from tables in another schema?
How to convert characters to numbers in oracle?
How to define an anonymous procedure with variables?