Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

case insensitive ZSQL queries

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


onsombal at yahoo

Sep 5, 2007, 4:16 PM

Post #1 of 4 (1724 views)
Permalink
case insensitive ZSQL queries

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>

Thanks... Jim


--
View this message in context: http://www.nabble.com/case-insensitive-ZSQL-queries-tf4388729.html#a12512815
Sent from the Zope - DB mailing list archive at Nabble.com.

_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


garry at schoolteachers

Sep 6, 2007, 12:10 AM

Post #2 of 4 (1625 views)
Permalink
Re: case insensitive ZSQL queries [In reply to]

On Wed, 2007-09-05 at 16:16 -0700, onsombal wrote:
> 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>
>
> Thanks... Jim
>
>
If you use Postgresql then change the 'like' to 'ilike'.
Regards
Garry

_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


onsombal at yahoo

Sep 6, 2007, 5:18 AM

Post #3 of 4 (1614 views)
Permalink
Re: case insensitive ZSQL queries [In reply to]

thanks -- it now works like a charm....


Garry Saddington wrote:
>
>
>
> On Wed, 2007-09-05 at 16:16 -0700, onsombal wrote:
>> 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>
>>
>> Thanks... Jim
>>
>>
> If you use Postgresql then change the 'like' to 'ilike'.
> Regards
> Garry
>
> _______________________________________________
> Zope-DB mailing list
> Zope-DB[at]zope.org
> http://mail.zope.org/mailman/listinfo/zope-db
>
>

--
View this message in context: http://www.nabble.com/case-insensitive-ZSQL-queries-tf4388729.html#a12521162
Sent from the Zope - DB mailing list archive at Nabble.com.

_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


maciej.wisniowski at coig

Sep 6, 2007, 5:32 AM

Post #4 of 4 (1609 views)
Permalink
Re: case insensitive ZSQL queries [In reply to]

> thanks -- it now works like a charm....
>
AFAIR 'ilike' in postgres doesn't properly support
i18n characters, so be carefull with that.

--
Maciej Wisniowski
_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.