in reply to Re: Question about perl & oracle & and a SQL query
in thread Question about perl & oracle & and a SQL query

Thanks too!! But i really dont know anything SQL in Oracle, and i prefeer to control how i run the query using perl (where i feel more skilled in it). But thanks anyway....another good response! :::When you dream, there're no rules, ppl can fly...anything can happen!!!:::
  • Comment on Re^2: Question about perl & oracle & and a SQL query

Replies are listed 'Best First'.
Re^3: Question about perl & oracle & and a SQL query
by massa (Hermit) on Feb 09, 2009 at 15:35 UTC
    FWIW, it's preferable if you do
    my $qry = qq(select contador, cod_entidad_oim, cod_agr, cod_operacio +n from mapcom_portext.TR0685002 where fch_hor_operacion between to_d +ate(?,'dd-mon-yyyy') and to_date(?,'dd-mon-yyyy'));
    and later
    my $sth = $dbh->prepare($qry); $sth->execute($now, $onehourago);
    ... etc. (just in case)...
    []s, HTH, Massa (κς,πμ,πλ)
      Thanks!!! This may be useful for me for another thin im planning, the use of variable when i execute the query.... Thanks a lot, very good answer!
Re^3: Question about perl & oracle & and a SQL query
by maxodyne (Initiate) on Mar 03, 2011 at 16:35 UTC

    If you want to get a now() out of Oracle, the only thing you need to know is to include the Oracle reserved word sysdate anywhere in your select statement.