>> # my $string = $dbh->quote("%7-Aug%");
> > my $date = qq(7-Aug);
> 
> I'm going this with PostgreSQL(DBD::Pg), and here's what works
> for me...

sorry, forgot to mention this is with ORacle.

> 
> You do need the percent-signs surrounding the LIKE text:
> 
>   my $date = "%7-Aug%";
> 
> > my $sth = $dbh->prepare("SELECT * FROM uptime WHERE sdate LIKE ?" )
> >     or die "can't prepare: $DBI::errstr\n";
> Your prepare is fine - the SQL is correct.
> 
> > $sth->execute("%$date%") or die "can't execute $DBI::errstr\n";
> 
> Try this:
>   $sth->execute($date) or die ...
> 
> > my @row;
> > while (@row = $sth->fetchrow_array() ) {
> >         print "@row\n";
> > }
> 

Tried it, still returns nothing and no error message.

Thanks 
Jim


Reply via email to