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


Please Help Members By Posting Answers For Below Questions

What is an index associated with a constraint?

562


What are the advantages of oracle 12c?

567


How to connect the oracle server as sysdba?

640


How would you begin to troubleshoot an ORA-3113 error?

1612


What are the ways tablespaces can be managed and how do they differ?

1632






How to rename an existing table?

619


What are the uses of synonyms?

620


what are archived logs?

1725


Explain a synonym?

614


What are the different types of modules in oracle forms?

568


What are the oracle built-in data types?

572


What are the attributes of cursor?

603


What privilege is needed for a user to delete rows from tables in another schema?

570


How to convert characters to numbers in oracle?

602


How to define an anonymous procedure with variables?

560