select to_char('10','10')
from dual
This gives me an error oRA-1481 INVALID NUMBER FORMAT MODEL

why? pls help

Answer Posted / neha k

to_char function can take both Number and String Values but
one at a time.

ie. select to_char(10) from dual;
select to_char('10') from dual;

both are valid.

Another form of overloaded function to_char accepts two
arguments first is Date and second if its format in which
it needs to be converted as string.

ie. select to_char(sysdate,'YYYYMMDD') from dual;

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1800


Why is oracle database so popular?

559


Point out the difference between user tables and data dictionary?

538


What is the difference between "as" and "is" in an oracle stored procedure?

535


What is blob data type in oracle?

555






What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?

520


How do I find my oracle client driver version?

522


Hi friends can u send the oracle 9i full version download link?????????????? please reply ?

1440


What is the difference between a hot backup and a cold backup in oracle?

570


Why do we need integrity constraints in a database?

584


Can you assign multiple query result rows to a variable?

546


How to use regular expression in pattern match conditions in oracle?

573


How to do paging with oracle?

572


How to connect to oracle using service name instead of sid?

547


How many types of table in Oracle?

614