Re: string not equal query, postgresql 9.4.4
От | John Scalia |
---|---|
Тема | Re: string not equal query, postgresql 9.4.4 |
Дата | |
Msg-id | 55FB6069.3030108@gmail.com обсуждение исходный текст |
Ответ на | Re: string not equal query, postgresql 9.4.4 ("David G. Johnston" <david.g.johnston@gmail.com>) |
Список | pgsql-admin |
On 9/17/2015 6:49 PM, David G. Johnston wrote:
Thanks for everyone's help, I should have examined the automated data collection more closely.
--
Jay
I tried your code above, and some additional queries prior to your message arriving, and I see now why I'm still getting multiple row beyond my original expecting. Carefully looking at the rows being produced showed that each instrument is performing a powerup test and all those passed. I guess I was just expecting too much from distinct and I understand why. I just need to add a second where clause if I can figure out how to make the powerup test clearly indicated as such in the table.
SELECT * FROM results where result <> 'PASS';
and it produced all the rows, not just the ones beginning with visc60 that I expected. Based on what you had written, I should have seen the correct output. So, any ideas? EXPLAIN ANALYZE SELECT * FROM results WHERE result <> 'PASS';What happens when you run the following? Do you see the same incorrect behavior?WITH vals (v) AS (VALUES ('PASS'::char(4)), ('FAIL'::char(4)))SELECT DISTINCT *FROM valsWHERE v <> 'PASS'::char(4);David J.
Thanks for everyone's help, I should have examined the automated data collection more closely.
--
Jay
В списке pgsql-admin по дате отправления: