Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Client and Server SQL statements work differently??
Alan D. Mills wrote:
>
> I recomment always using the TO_DATE function and never assuming a date
> format will be the default one for a particular database instance.
I agree with Alan, with PL/SQL I also recommend adding the explicit
conversion
function into the code instead of assuming the conversion will be
achieved
implicitly.
Perhaps this has been discussed before (for which I apologise in
advance) but with
function overloading in the more recent versions of PL/SQL you can
generate an
'interesting' scenario:
Consider one package which has two functions. Both functions have the
same name (for
the sake of this example lets assume the name is "f"), but the first
takes a single
argument of type varchar2, and the second takes a single argument of
type date.
Now what happens if you call the function like so: f('5-AUG-98') ?
You meant to call the date version, but the varchar2 is a closer fit...
I'm sure that some readers will question the wisdom of creation of two
such functions.
Feedback politely requested.
Regards
Mungo Henning Received on Thu Aug 06 1998 - 10:49:32 CDT
![]() |
![]() |