Home » SQL & PL/SQL » SQL & PL/SQL » to check the datatype of argument passed inside procedure
to check the datatype of argument passed inside procedure [message #207535] Tue, 05 December 2006 23:35 Go to next message
gauravpuri
Messages: 26
Registered: August 2005
Location: Chennai
Junior Member

hi

If the procedure has argument of varchar2 type and i am passing
number it will accept.then how to test inside procedure
whether passed argument is number or varchar2.


Regards
Gaurav
Re: to check the datatype of argument passed inside procedure [message #207554 is a reply to message #207535] Wed, 06 December 2006 00:33 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
The passed argument will be a varchar2. It maybe so that it only contains numeric characters, but it will still be a string.
It is a bad idea to use a varchar2 parameter if you expect a number or date.
If you want to check if your input can be converted to a number, search this site for is_numeric.
Previous Topic: Diff b/w distinct & group by clause
Next Topic: top 10 rows
Goto Forum:
  


Current Time: Sun Dec 11 07:56:15 CST 2016

Total time taken to generate the page: 0.25321 seconds