t == t...@sss.pgh.pa.us writes:
t> Brandon Metcalf writes:
t> > I tried moving the last group of WHERE, GROUP BY, and ORDER BY before
t> > the UNION with the query it belongs to, but that results in a
t> > different syntax error.
t> I think that's probably what you want to do. What you're
M == matthew.hart...@krcc.on.ca writes:
M> > > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
M> > > ow...@postgresql.org] On Behalf Of Brandon Metcalf
M> > > Sent: Friday, July 10, 2009 12:16 PM
M> >
M> > Change it to this:
M> Sorry, I forgot that you need to split the GRO
Brandon Metcalf writes:
> I tried moving the last group of WHERE, GROUP BY, and ORDER BY before
> the UNION with the query it belongs to, but that results in a
> different syntax error.
I think that's probably what you want to do. What you're missing is
you need parentheses to put an ORDER BY in
> > From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> > ow...@postgresql.org] On Behalf Of Brandon Metcalf
> > Sent: Friday, July 10, 2009 12:16 PM
>
> Change it to this:
Sorry, I forgot that you need to split the GROUP BY clause as well in a
similar manner to the WHERE clause. An
> -Original Message-
> From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
> ow...@postgresql.org] On Behalf Of Brandon Metcalf
> Sent: Friday, July 10, 2009 12:16 PM
Change it to this:
> SELECT t.name AS machine_type_name,
> j.workorder,
>