[Zope-dev] ZSQL Question

Monty Taylor mtaylor@goldridge.net
Wed, 12 Jul 2000 08:21:35 GMT


Let me preface this by saying: this is an untested guess. I don't have 
Access around anywhere to play with.

But, my guess would be that since you're connecting using ODBC, you'll 
have to use standard SQL wildcards instead of Microsoft extensions. So 
try 
  select * from SomeTable where SomeField like '%project%'

Monty


>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 7/12/00, 6:51:31 AM, Daniel Sashko <daniels@play.com> wrote regarding 
[Zope-dev] ZSQL Question:


>     Hello, is there a way in Zope to search on the pattern of the field 
in
> the database??

> for example::

> through ZODBC using ZSQL connected to ACCESS database I have a query that
> goes like this:

>   select * from SomeTable where (SomeField Like '*project*')


> If I run this SQL in ACCESS directly it returns all the records where the
> field SomeField has the word "project" anywhere in the text... but when I
> run it through the ZSQL I get nothing in return.....

> Is there another key word to be used with ZSQL or is it just imposible to
> query on the patterns????

> What's weird, the ZSQL does not choke on the "Like" word... it just says
> that there was no data matching the query...


> any one has any ideas?


> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )