Search Postgresql Archives

Question about the ANY operator

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

 



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[];

I get the syntax error:

ERROR:  syntax error at or near "ARRAY"
LINE 1: ...* from Users where UserId = ANY ARRAY['948...

I know I could just use a bunch of OR clauses, but I want to pass in this array as a variable.  Any clue as to what I'm doing wrong?

Mike

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux