[Zope] Re: [Zope-DB] case insensitive ZSQL queries

Josh Burvill jburvill at gmail.com
Thu Sep 6 10:18:20 EDT 2007


Providing your database has the upper() function, or replace with similar


select ...
<dtml-sqlgroup where>
  <dtml-if firstname>
     upper(firstname) like upper(<dtml-sqlvar firstname type=string>)
   </dtml-if>
  <dtml-or>
    <dtml-if lastname>
     upper(lastname) like upper(<dtml-sqlvar lastname type=string>)
   </dtml-if>
  <dtml-or>
    ...etc...
  </dtml-sqlgroup>

On 06/09/07, Jaroslav Lukesh <lukesh at seznam.cz> wrote:
>
> Use MS-SQL or Sybase :o)
>
> ----- Original Message -----
> From: "onsombal" <onsombal at yahoo.com>
> >
> > is there an easy way to make the following ZSQL query case-insensitive?
> >
> > select * from clients
> > <dtml-sqlgroup where>
> >    <dtml-sqltest firstname op="like" type="string" optional>
> >  <dtml-or>
> >    <dtml-sqltest lastname op="like" type="string" optional>
> >  <dtml-or>
> >    <dtml-sqltest client op="like" type="string" optional>
> >  </dtml-sqlgroup>
> >
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope-dev )
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope/attachments/20070906/6408a5d0/attachment.htm


More information about the Zope mailing list