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: Insert date into Oracle

Re: Insert date into Oracle

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: Sun, 23 May 2004 21:12:06 +0100
Message-ID: <40b18c25$0$20514$cc9e4d1f@news-text.dial.pipex.com>


It also rather suffers from the problem that the column immediately following the date would also look like a datetime column, but with a different format hh24:mi :(.

I find it impossible to believe that you can change the database used by a proper c++ application and expect not to have to change any sql at all.

-- 
Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com
"Jim Kennedy" <kennedy-downwithspammersfamily_at_attbi.net> wrote in message
news:S33sc.46797$gr.4596365_at_attbi_s52...

> Yes, You would set the nls_date format. However, this is prone to error
> since someone could change it on their system without your knowledge. You
> could do an alter session (you would have to change the application or
> create a logon trigger) and that would minimize the potential that someone
> changes an env. variable on the client machine.
> Jim
> "Allan" <dragon19993_at_yahoo.com> wrote in message
> news:b93d704b.0405230554.706c3fe2_at_posting.google.com...
> > Thanks for your reply.
> >
> > I think I didn't make myself clear. We have a application which has
> > been used for 30 years and now we want to move from Unify database
> > into Oracle and also we don't want to change the application code.
> >
> > Problem is that the application is wrriten by c++ and get the date
> > from OS. But now in order to insert the date into Oracle, we have to
> > use to_date function to convert the date.
> >
> > I am just wondering if there is another way around to insert date into
> > Oracle without using to_date function and sysdate function. that way
> > we don't need modify our c++ code for application.
> >
> > Thanks in advance
> >
> > Alan
> >
> >
> > "paddy_nyr" <mpprpp_at_yahoo.com> wrote in message
> news:<2h72blF9qr6rU1_at_uni-berlin.de>...
> > > "Allan" <dragon19993_at_yahoo.com> wrote in message
> > > news:b93d704b.0405211051.73462822_at_posting.google.com...
> > > > Here is my SQL Statement:
> > > >
> > > > insert into AD.aracct_range (acct_range, acct_range_desc, login,
> > > > log_date, log_time)
> > > > values ('b', 'not applicable', 'wang', to_date('05/21/2004',
> > > > 'mm/dd/yyyy'), '14:24');
> > > >
> > > >
> > > > Is that any possible to insert date without using to_date function.
> > > > Because my application currently migrate from Unify database to
> > > > Oracle.
> > > >
> > > > Thanks in Advance
> > > >
> > > > Alan
> > > >
> > > If your going to be using the current date then use 'sysdate' and that
> will
> > > get you both date and time.
> >
Received on Sun May 23 2004 - 15:12:06 CDT

Original text of this message

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