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

Home -> Community -> Usenet -> c.d.o.server -> Re: Bind Variables

Re: Bind Variables

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/03/08
Message-ID: <8a5j5k$fpv$1@nnrp1.deja.com>#1/1

In article <952518802.24111.0.nnrp-04.9e9859ae_at_news.demon.co.uk>,   "Sonia Gillespie" <sonia_gillespie_at_lagan.com> wrote:
> Is there a way of declaring a bind variable of date type? I need it
 to pass
> into the call of a stored procedure. I'm using Oracle 7.3.4.
>
> Thanks
>
> --
> Sonia Gillespie
> E-mail: sonia_gillespie_at_lagan.com
>
>

The answer is "yes, depending on the client HOWEVER, you never actually want to do that".

The Oracle date format is a 7 byte binary format and isn't easy to use as is. You would almost always fetch the date back to a client in either a string format or in a number (as a julian date for example, or converted to the number of seconds since some point in time -- 1/1/1970 for example).

You would then always use TO_CHAR() (or to_number(to_char())) on the way OUT and TO_DATE() on the way in and bind either a STRING or a NUMBER.

--
Thomas Kyte                              tkyte_at_us.oracle.com
Oracle Service Industries
http://osi.oracle.com/~tkyte/index.html
--
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Mar 08 2000 - 00:00:00 CST

Original text of this message

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