Re: Pro*C Insert Date/Time

From: Charles M. Amorose <camorose_at_trimarksecurities.com>
Date: 1998/01/25
Message-ID: <34CC1606.E2163563_at_trimarksecurities.com>#1/1


I added a call to set the nls_date_time to match the MS-SQL converted (113) output.
'dd mon yyyy hh24:mi:ss', and that did it.

Karl E. Jørgensen wrote:

> Your first attempt (using the to_date() function with a format) looks
> spot-on.
>
> >It just dont work?
> Then give us some error messages to work with !
> I suspect that the format of the date in the :ds.date_time_entered variable
> doesn't quite match the format you specify in to_date(), but without the
> error messages, I'm not quite sure.
> By the way, I'm assuming that :ds.date_time_entered is a string.
>
> --
> Hope this helps
>
> Karl
> Oracle Certified DBA
>
> Charles M Amorose <72520.2374_at_CompuServe.COM> wrote in message ...
> >I am trying to write a program that will read records from MS-SQL
> >(6.5)
> >and the insert them into Oracle (8.0.3.0.0).
> >
> >What is the exact syntax for inserting a date/time field in
> >Pro*C?
> >
> >1st Attempt:
> > EXEC SQL AT DB_NAME INSERT INTO TEST_ORD
> > values(:ds.tag,
> > :omk,
> > to_date(:ds.date_time_entered,'DD MON YYYY
> >HH24:MI:SS'));
Received on Sun Jan 25 1998 - 00:00:00 CET

Original text of this message