Why not just put it as a constraint on the table to supply a default value
of SYSDATE for the column? Then you don't have to deal with it from the
program side at all.

On Jun 14, Kipp, James scribed:

> THANKS! I just found that out the hardway :)
> Thanks all for your help. SYSDATE is the best way to go for my situation
>
>
> > -----Original Message-----
> > From: Jeff Seger [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 14, 2002 2:35 PM
> > To: Kipp, James
> > Cc: [EMAIL PROTECTED]
> > Subject: RE: best way to insert date/time into oracle table
> >
> >
> > Don't put SYSDATE in the execute.  Put it in the prepared statement:
> >
> >
> > my $sth = $dbh->prepare( "INSERT INTO stats VALUES
> > (SYSDATE,?,?,?,?)" )
> >         or die "Cannot prepare SQL statements from $DBI::errstr\n";
> >
> > foreach (@stats){
> >         chomp;
> >         ($host, $user $cpu_pct, $mem_pct = split( /,/ );
> >
> >
>

Reply via email to