Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    1

    Exclamation Unanswered: Accent insensitive query

    Hi everybody:

    I'm making a PHP - postgresql (7.2) based application and I need to make an intelligent search box which accepts case-insensitive and accent-insenstive querys.

    So far I have something like:

    select * from detalle_pat where nombre ~* 'ELYSEES' order by rank, nombre


    And because of ~ I have solved de case-insensitive query but in my data there is in the name: ELYSÉES (with accent on E) So this select statement
    won't find anything.

    I've tryed to look for this answer on postgresql.org but it seems that archives.postrgresql.org (where is suposed to be the answer ) wont work.

    Any Ideas?


    Thanks

    Lothi

  2. #2
    Join Date
    Mar 2004
    Posts
    110

    like and ilike

    If you are trying to use case-insensitive with StRiNgs use: ilike.
    If you want exact match of a StRiNg use: like

    Hope that helps

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •