Up Prev Next
From: "Ellery, Michael BGI SF" <Michael dot Ellery at barclaysglobal dot com>
Subject: RE: searching through text field
Date: Jun 10 1999 9:12PM
Since you are using double quotes( qq() ), perl tries to interpolate vars --
I'd say it's probably trying to interpolate the hash %searchstring, which I
assume is empty. try a \ before each % to escape those characters.
Just a guess, though....
Barclays Global Investors
45 Fremont St., 6th Floor #102
San Francisco, CA 94105
(415) 908-7234 [PH], (415) 597-2352 [FAX]
> -----Original Message-----
> From: Oliver Scheit [SMTP:firstname.lastname@example.org]
> Sent: Thursday, June 10, 1999 5:36 AM
> To: SybPerl Discussion List
> Subject: searching through text field
> Sorry to bother you, but I've got this stupid problem:
> I want to search through a text field in a table using the "like
> %somestring%" method.
> I read about the "readtext"-sql-statement, but I don't understand it.
> Here's what I want to do: (using Sybperl::CTLib)
> $query = $q->ct_sql( " select * from mytable where textcol like
> '%searchstring%' " ) ;
> now, "textcol" is of the type text.
> How do I have to change my code so it'll work ?
> Regards, Oli