On Tue, Dec 17, 2013 at 3:44 PM, Mike Andrewjeski
<Mike.Andrewjeski@businesswire.com> wrote:
>
> Hi all,
>
> psql newbie here. I'm working to convert a mysql query written in ruby to
> using postgres as our database is now postgres 9.2
>
> Here's the mysql query:
>
> select nodes.name, GROUP_CONCAT(node_groups.name) from node_groups,
> node_group_memberships, nodes where nodes.id =
> node_group_memberships.node_id and node_groups.id =
> node_group_memberships.node_group_id and nodes.name IN (SELECT name
> from nodes) group by nodes.name order by nodes.name")
> What I'm having an issue with is the IN Clause. Not sure how to do that in
> psql.
>
Hi,
I was looking at this and i admit i don't understand how that IN could
ever be false (which could be caused by the beer i just drank).
The reason i don't understand it is that you are checking if the names
in table nodes exists in the table nodes :S
--
Jaime Casanova www.2ndQuadrant.com
Professional PostgreSQL: Soporte 24x7 y capacitación
Phone: +593 4 5107566 Cell: +593 987171157