Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Client and Server SQL statements work differently??

Re: Client and Server SQL statements work differently??

From: Mungo Henning <mungoh_at_itacs.strath.ac.uk>
Date: Thu, 06 Aug 1998 16:49:32 +0100
Message-ID: <35C9D08C.5CE02CB9@itacs.strath.ac.uk>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US