Thanks for the info. I am actually trying to get the time on our oracle data base and compare it to the local time on each machine. Then if there's a difference + or - say 10 minutes. Put it into a report showing that the machine needs to be reset.
Is there a way to convert the HH24:MI:SS to total seconds? I need to compare it to the time in seconds on each machine. regards, John -----Original Message----- From: Fay Jason-W13246 [mailto:[EMAIL PROTECTED] Sent: Friday, February 21, 2003 6:11 PM To: Perl-Win32-Admin-Request \(E-mail\) Subject: RE: sql statements >Hi cliff, > >I plugged that statement into my >code and it's still having a problem. >Could you take a look at my code to >see what the problem could be: > >$dbh = DBI->connect("dbi:Oracle:",'username','password'); > >my $sth = $dbh->prepare(qq{select sysdate into :mydate from dual}); > >if ( $sth ) { > $sth->execute; > } >$dbh->disconnect; > >regards, > >John When using the DBI / DBH modules, you don't need to bind an Oracle variable (ie 'into :mydate') as you are in this example. Change your query from 'select sysdate into :mydate from dual' to 'select sysdate from dual' and then put the query result from your sth handle into a scalar variable. Now if you want to change the default format that Oracle uses for date datatypes, (ie YYYY-MM-DD) you would need to further modify your query. 'select to_char(sysdate,'YYYY-MM-DD HH24:MI:SS') from dual'. Regards, Jason Fay Software Engineer - Motorola PCS _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
