Re: problem with query

From: Roberto Scattini <roberto(dot)scattini(at)gmail(dot)com>
To: pgsql <pgsql-general(at)postgresql(dot)org>
Subject: Re: problem with query
Date: 2013-09-12 21:33:22
Message-ID: CAApYZY-R=c-gVi0fptQ-BS3FKStr7VLao97Ejd=E9vn+qWhj9Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Sep 12, 2013 at 6:22 PM, Chris Curvey <chris(at)chriscurvey(dot)com> wrote:

>
>
> On Thu, Sep 12, 2013 at 4:34 PM, Roberto Scattini <
> roberto(dot)scattini(at)gmail(dot)com> wrote:
>>
>>
>> we are using postgresql 9.1 from ubuntu packages and the database
>> encoding is (sadly) SQL_ASCII
>>
>> can anybody point me in the right direction to solve this issue?
>>
>> --
>> Roberto Scattini
>>
>
> If you could tells what you are expecting, and what you are actually
> getting, that would be helpful.
>
>
hi chris, sorry, the query with ilike '%NUÑEZ%' is returning 4 rows and
the query with ilike '%nuñez%' is returning 0 rows.

a simplified version of the query with his results:

pgn=# set client_encoding = SQL_ASCII;
SET
pgon=# SELECT DISTINCT
p.id, p.apellido, p.nombre
FROM personal.personas AS p
WHERE p.apellido ilike '%nuñez%';
id | apellido | nombre
----+----------+--------
(0 rows)

pgon=# SELECT DISTINCT
p.id, p.apellido, p.nombre
FROM personal.personas AS p
WHERE p.apellido ilike '%NUÑEZ%';
id | apellido | nombre
-------+----------------+-----------------
39489 | NUÑEZ | JUAN
39937 | PEREZ NUÑEZ | FRANCISCO
39498 | NUÑEZ ESQUIBEL | RICARDO RODOLFO
40220 | NUÑEZ VERA | MANUEL SANTIAGO
(4 rows)

thanks!

--
Roberto Scattini

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Chris Curvey 2013-09-12 21:49:47 Re: problem with query
Previous Message Chris Curvey 2013-09-12 21:22:51 Re: problem with query