Question about the ANY operator

Поиск
Список
Период
Сортировка
От Mike Christensen
Тема Question about the ANY operator
Дата
Msg-id 7aa638e00912210246p29bba173wea0488931d2fe7ac@mail.gmail.com
обсуждение исходный текст
Ответы Re: Question about the ANY operator  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Charset Win1250 on Windows and Ubuntu
Следующее
От: Ivan Voras
Дата:
Сообщение: Re: Something like Oracle Forms, but Open Source to use with PostgreSQL?