Re: Question about the ANY operator

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Mike Christensen <mike(at)kitchenpc(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Question about the ANY operator
Date: 2009-12-21 10:49:20
Message-ID: 20091221104919.GC28076@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 21, 2009 at 02:46:59AM -0800, Mike Christensen wrote:
> I'm having trouble figuring out the ANY operator.. Basically I want to
> return rows that match any of the given IDs:
>
> select Name from Users where UserId = ANY
> ARRAY['948aeda5-ffff-41bd-af4e-71d1c740db76',
> '5ee315ea-7ef6-4fa5-809a-dc9931a01ed1']::uuid[];

The syntax is '= ANY(foo)', you're missing the parenthesis.

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while
> boarding. Thank you for flying nlogn airlines.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Mike Christensen 2009-12-21 10:54:39 Re: Question about the ANY operator
Previous Message Ivan Voras 2009-12-21 10:48:24 Re: Something like Oracle Forms, but Open Source to use with PostgreSQL?