Search Postgresql Archives

...where 'value' = array[]

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

 



i have table, like so:
group.group_name (varchar) | group.group_array (varchar[])
-
west coast | {CA,WA}
east coast | {NY,MA}

i can do this:
select group_name from group where 'CA' = any(array['CA','WA']);

but i need to select group_name where state_abbreviation is in
group_array, something like:
select group_name from group where 'CA' = any(group_array);
or
select group_name from group where 'CA' in (group_array);
or
select group_name from group where 'CA' in (select group_array from
group where true);

all ()[]{} have me confused
http://www.nabble.com/IN-with-arrays-td10011058.html

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[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