Re: [NOVICE] Trouble with IN operator - Mailing list pgsql-novice

From David G. Johnston
Subject Re: [NOVICE] Trouble with IN operator
Date
Msg-id CAKFQuwY9HFi_zZY-eaSPo_0jiqu4+w1f88kV68vg9pfjJ28RVQ@mail.gmail.com
Whole thread Raw
In response to Re: [NOVICE] Trouble with IN operator  (Cat <cat@zip.com.au>)
List pgsql-novice
On Friday, February 3, 2017, Cat <cat@zip.com.au> wrote:
On Fri, Feb 03, 2017 at 01:48:49PM -0500, Chuck Roberts wrote:
> Yes there is data that matches the criteria of the IN condition. When I
> remove the clause with the IN, I get all kinds of records that look like
> they match the criteria. The tbl.costcenter is a string of 3 characters,
> but it only contains numbers which are zero padded, like '001', '540',
> '900'. There should be no room for odd characters, even though users do
> enter this number.
>
> Also I tried a case-insensitive regex, and that didn't work either. Ex:
> AND (tbl.costcenter ~* '(540|001|900)')


Unsurprising given that there is no concept of "case" with numbers.

David J.

pgsql-novice by date:

Previous
From: Cat
Date:
Subject: Re: [NOVICE] Trouble with IN operator
Next
From: Rounak Jain
Date:
Subject: [NOVICE] alter existing table column with primary key to auto-increment