string not equal query, postgresql 9.4.4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux