Re: Trouble with IN operator

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chuck Roberts <croberts(at)gilsongraphics(dot)com>
Cc: Chris Campbell <ccampbell(at)cascadeds(dot)com>, PSql novice list <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Trouble with IN operator
Date: 2017-02-03 18:40:58
Message-ID: 29384.1486147258@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Chuck Roberts <croberts(at)gilsongraphics(dot)com> writes:
> I think this might be a data problem. If anyone else has an idea, it's
> welcome.

Well, the obvious question is, are you sure you have records that *should*
match the condition?

Plain "trim" is not very bright, it will only remove characters that are
plain ASCII spaces. I'm wondering a bit about whether there's carriage
returns, tabs, non-breaking spaces, or other weird kinds of whitespace in
your data, which might make it so records that look like they contain
"540" don't actually match.

regards, tom lane

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Chuck Roberts 2017-02-03 18:48:49 Re: Trouble with IN operator
Previous Message Chuck Roberts 2017-02-03 18:29:27 Re: Trouble with IN operator