phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheyenne Forbes <cheyenne.osanu.for...@gmail.com>
Subject ORDER BY not working with UNION ALL
Date Wed, 03 May 2017 23:57:22 GMT
 I get "Undefined column family. familyName=f" whenever I run the following
query,it works without the ORDER BY and works with the ORDER BY if its not
a union and just one select statement

       SELECT
              p.name
        FROM
              person p
        JOIN
              friends f
        ON
              f.person = p.id
        WHERE
              567 != ANY(f.persons)
UNION ALL
        SELECT
              p.name
        FROM
              person p
        JOIN
              friends f
        ON
              f.person = p.id
        WHERE
              123 != ANY(f.persons)
        ORDER BY f.date_time LIMIT 20

Regards,

Cheyenne O. Forbes

Mime
View raw message