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
on 3/27/01 10:56 PM, Donald Braman at donald.braman@yale.edu wrote:
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 use the % sign with Access and it seems to work OK WHERE Short_Case_Name LIKE 'Plessy%' Cheers tom -- tom smith | tom@othermedia.com http://www.othermedia.com/blog tel 020 8541 5355 | fax 020 8541 5507 11 penrhyn road, kingston-upon-thames, london KT1 2BZ
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 )
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.
Try: WHERE Short_Case_Name LIKE 'Plessy%' Dimitris @ Nuclear
participants (4)
-
Dimitris Andrakakis -
Donald Braman -
Phil Harris -
tom smith