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!

How to identify if a Varchar2 string has a-z characters?

518258Jul 7 2009 — edited Jul 7 2009
Gurus,
I have a scenario where in my Procedure is fetching some data from Remote Database (Source) and Updating some columns in my Database (Destination). But, one column Column1 (say) is defined as Varchar2 in Source DB whereas its corresponding column in Destination DB is defined as Number.

The problem arises when Source DB has Character values for Column1. (Ultimately it gives ORA-06502: PL/SQL: numeric or value error: character to number conversion error).

And at this stage I cant modify the Data Type of Destination column ( to make it Varchar2 ! )
Hence I am trying to figure out if I can check"If the Source DB Column1 has only Numeric value then only update Destination DB Column else NOT"

Is this possible somehow? Can we check if a string has only numbers in it?

Source DB - Oracle 10g
Destination DB - Oracle 9i

Thanks in Advance!
-Abhijit.
This post has been answered by Frank Kulash on Jul 7 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 4 2009
Added on Jul 7 2009
6 comments
25,167 views