Some date inserts I have experience with regarding Oracle and mssql (if this
helps).

Mark

--Oracle
insert into order_details (OrderID, ProductID, UnitPrice, Quantity,
Discount, OrderDate, ProductName)
    VALUES (5,1,1,1,1,TO_DATE ('4/01/1953', 'MM/DD/YYYY'),'name') ;

--mssql
insert into "order details" (OrderID, ProductID, UnitPrice, Quantity,
Discount, OrderDate, ProductName)
    VALUES (5,1,1,1,1,'4/01/1953','name') ;
-or-
insert into "order details" (OrderID, ProductID, UnitPrice, Quantity,
Discount, OrderDate, ProductName)
    VALUES (5,1,1,1,1,'apr 1, 1953','name') ;

-----Original Message-----
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 14, 2002 9:53 AM
To: 'Michael Nhan'; '[EMAIL PROTECTED]'
Subject: RE: best way to insert date/time into oracle table


can i simply do :
foreach (@stats){
        chomp;
        ($host, $user $cpu_pct, $mem_pct = split( /,/ );
        $sth->execute(  sysdate(),  $host, $user $cpu_pct, $mem_pct );
}

or do i have to do another query like
select SysDate from DUAL;

thanks Michael !!


>
>
> > what are my options for inserting DATE/TIME into each record ?
>       SYSDATE works fine for us here.  Make sure your oracle
> server has
> the correct system time/date.
>
> Cheers,
>
> Michael
>
>


Reply via email to