> -----Original Message-----
> > Do youthink there is a way to ensure that the order of the values in the
> > array below is the same for each person?
> >
> > tbl(eID, aID, value)
> >
> > Select eID, array_accum(value) from
> > (
> >  (Select Distinct eID from tbl) e
> >   CROSS JOIN
> >  (Select Distinct aID from tbl) a
> > ) ea
> >  LEFT OUTER JOIN
> > tbl USING (eID, aID)
> > GROUP BY eID
> 
> The only way to ever guarantee a particular order is via an ORDER BY
> clause.

Sure. I just didn’t know where to put it - most aggregates don't care about the 
row order, but for this one it is important.


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org/

Reply via email to