Re: [GENERAL] All and ANY

2011-10-26 Thread Gavin Flower
On 27/10/11 02:38, salah jubeh wrote: Can someone please direct me where I can find documentation about ALL and ANY functions. I searched postgresql documentation but I did not find the appropriate pages Thanks in advance Read the reference URLs provided by the other replies, as I quote onl

Re: [GENERAL] All and ANY

2011-10-26 Thread John R Pierce
On 10/26/11 6:38 AM, salah jubeh wrote: Can someone please direct me where I can find documentation about ALL and ANY functions. I searched postgresql documentation but I did not find the appropriate pages http://www.postgresql.org/docs/current/static/functions-subquery.html#FUNCTIONS-S

Re: [GENERAL] All and ANY

2011-10-26 Thread Mike Blackwell
http://www.postgresql.org/docs/9.1/static/functions-subquery.html __ *Mike Blackwell | Technical Analyst, Distribution Services/Rollout Management | RR Donnelley* 1750 Wallace Ave | St Charles, IL 60174-3401 Office: 63

Re: [GENERAL] <> ALL( ... ) and <> ANY ( ... ) didn't behave as expected

2007-10-10 Thread Richard Broersma Jr
--- "John D. Burger" <[EMAIL PROTECTED]> wrote: > I read this as: Find all parents such that none of their kids are > girls and none of their kids are boys. That is, ALL of their genders > are <> 'girl', AND ALL of their genders are <> 'boy'. Under the > obvious assumptions about gender, th

Re: [GENERAL] <> ALL( ... ) and <> ANY ( ... ) didn't behave as expected

2007-10-10 Thread Tom Lane
Richard Broersma Jr <[EMAIL PROTECTED]> writes: > Can anyone explain why <> ANY() behaves that way it does? Aside from the responses already given, I'm wondering whether you have any NULL entries in Children.gender. NULL rows within a NOT IN subselect tend to produce confusing results ...

Re: [GENERAL] <> ALL( ... ) and <> ANY ( ... ) didn't behave as expected

2007-10-10 Thread Erik Jones
On Oct 10, 2007, at 12:38 PM, Richard Broersma Jr wrote: I expect that my intuition is incorrect about the use of ALL() and ANY(), but I found my result to be reverse from what I expected. Can anyone explain why <> ANY() behaves that way it does? Here are two test case examples that do what

Re: [GENERAL] <> ALL( ... ) and <> ANY ( ... ) didn't behave as expected

2007-10-10 Thread Richard Huxton
Richard Broersma Jr wrote: Here is the example that doesn't do what I expect: I'm guessing you're just stood too close to the problem. --find all parents that have a mixture of boys and girls. --but this doesn't return anything SELECT * FROM Parents AS P WHERE 'girl' <> ALL ( SELECT gender

Re: [GENERAL] <> ALL( ... ) and <> ANY ( ... ) didn't behave as expected

2007-10-10 Thread John D. Burger
Richard Broersma Jr wrote: Here is the example that doesn't do what I expect: --find all parents that have a mixture of boys and girls. --but this doesn't return anything SELECT * FROM Parents AS P WHERE 'girl' <> ALL ( SELECT gender FROM Children AS C1