From: John Scalia <jayknowsunix@gmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: string not equal query, postgresql 9.4.4
Date: Wed, 16 Sep 2015 20:14:25 -0500
Message-ID: <55FA13F1.7060204@gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi all,
Having a bit of a head-scratching problem. I'm writing a query where I want to output only distinct rows where one char(4) field does not equal a specific value. Something like:
select distinct testname where result <> 'PASS"; #i.e., only the FAIL or WARN tests
I've tried several different variants like "!~", "not like ('PASS')", "is distinct from 'PASS'", and so forth, but obviously I'm missing something as every row is being output not
just the ones which do not equal PASS. What would be the correct syntax for this in a 9.4.4 database?
--
Jay
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: jayknowsunix@gmail.com
Subject: Re: string not equal query, postgresql 9.4.4
In-Reply-To: <55FA13F1.7060204@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox