Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Implicit Conversion

552509May 12 2008 — edited May 12 2008
Hi
I have this query.

select distinct project_status_code from apps.pa_projects_all where 1002= project_status_code

It is throwin a invalid number error.

However, when i do the explicit conversion

select distinct project_status_code from apps.pa_projects_all where to_char(1002)= project_status_code

Im not getting any error.

Why is this happening?

Note: project status code is of varchar2 datatype. and my database is Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit

Regards
Vibhuti
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2008
Added on May 12 2008
4 comments
559 views