Re: [Zope] case insensitive searches
you didnt read the rest of the message or my example. Its all very well using the sql lower function, but if you cant force the user to type the input in lower case you are wasting your time. However, I have now cracked it, as a later message to the group shows, but only in the report dtml, not in the sql method. See my web page for further details On Wed, 17 Jan 2001 22:13:51 +0100 (CET) Dieter Maurer <[EMAIL PROTECTED]> wrote: > Maggie Shapland writes: > > How does one do a case-insensitive search using sql > > methods when the underlying database is case-sensitive? > Oracle, e.g., provides functions "LOWER" and "UPPER" > that you can use in SQL expressions. > They can be used to implement case-insensitive searches. > > Look at the list of built-in functions for your database. > > > Dieter > -- Maggie Shapland, Computing Service, University of Bristol, Tyndall Av, Bristol BS8 1UD Tel: 0117-9289869 (Int 9869) Email: [EMAIL PROTECTED] Web page: http://www.cse.bris.ac.uk/~ccmjs/ 1925 Lanchester 21, 1925 Talbot 10/23, 1929 Peugeot 190S, 1986 Moss Monaco ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] case-insensitive searches
I wrote: >How does one do a case-insensitive search using sql >methods when the underlying database is case-sensitive? Although I can >force the search on the database to look for a lower case string, I >cant make the person giving the value give me the value in lower case, >and I know I shouldnt use dtml-var due to security reasons. >I guess I really want the dtml-var attributes implemented >in sql-var since >lower(fieldname) like type=string lower> >does a case sensitive search whereas: >lower(fieldname) like '%%' >works fine since it forces the user input to lower case I realise one can force the case of the input by an extra call in the report before the dtml-in clause eg but it would still be nice to be able to include lower as an attribute to sqlvar. By the way I am trying to document SQL solutions (relating to Oracle) as I hit them in: http://www.cse.bris.ac.uk/~ccmjs/zope_sql.htm -- Maggie Shapland, Computing Service, University of Bristol, Tyndall Av, Bristol BS8 1UD Tel: 0117-9289869 (Int 9869) Email: [EMAIL PROTECTED] Web page: http://www.cse.bris.ac.uk/~ccmjs/ 1925 Lanchester 21, 1925 Talbot 10/23, 1929 Peugeot 190S, 1986 Moss Monaco ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] case insensitive searches
How does one do a case-insensitive search using sql methods when the underlying database is case-sensitive? Although I can force the search on the database to look for a lower case string, I cant make the person giving the value give me the value in lower case, and I know I shouldnt use dtml-var due to security reasons. I guess I really want the dtml-var attributes implemented in sql-var since lower(fieldname) like does a case sensitive search whereas: lower(fieldname) like '%%' works fine since it forces the user input to lower case ------ Maggie Shapland, Computing Service, University of Bristol, Tyndall Av, Bristol BS8 1UD Tel: 0117-9289869 (Int 9869) Email: [EMAIL PROTECTED] Web page: http://www.cse.bris.ac.uk/~ccmjs/ 1925 Lanchester 21, 1925 Talbot 10/23, 1929 Peugeot 190S, 1986 Moss Monaco ___ Zope maillist - [EMAIL PROTECTED] 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 )