[Zope] ZSQL & LIKE Operator

Phil Harris phil.harris@zope.co.uk
Tue, 27 Mar 2001 23:01:59 +0100


The wildcard via ODBC is '%' not '*'.  Don't ask me why though, but '%' is
the standard way of doing it.

Try:

SELECT *
FROM Cases
WHERE Short_Case_Name LIKE 'Plessy%'


hth

Phil

----- Original Message -----
From: "Donald Braman" <donald.braman@yale.edu>
To: <zope@zope.org>
Sent: Tuesday, March 27, 2001 10:56 PM
Subject: [Zope] ZSQL & LIKE Operator


> I'm trying to get Zope to submit a "like" statement to MS Access (please
> don't ask why I'm using MS Access; it's a temporary situation). Anyway,
> I can't get a working ZSQL method LIKE and a wildcard.
>
> I try:
> SELECT *
> FROM Cases
> WHERE Short_Case_Name LIKE 'Plessy v. Ferguson'
> works fine; I try:
> WHERE Short_Case_Name LIKE 'Plessy*'
> I get no data matching query.
>
> I can run the query through MS Access SQL view just fine; not sure why
> it's not working with ZSQL.
>
> Donald Braman
> donald.braman@yale.edu
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )