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

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 (κς,πμ,πλ)

Replies are listed 'Best First'.
Re^4: Question about perl & oracle & and a SQL query
by Sombrerero_loco (Beadle) on Feb 10, 2009 at 14:57 UTC
    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!