On Tue, Sep 12, 2006 at 04:37:55PM -0400, Tom Lane wrote:
> Note that if you need to GROUP in the outer query, it's best to sort the
> inner query's output first by the outer query's grouping:
...
Great - this works fine. Thanks also to the other people who replied.
Steven.
--
w: http://www.cl.
Steven Murdoch escreveu:
I would like to concatenate sorted strings in an aggregate function. I
found a way to do it without sorting[1], but not with.
Here is an example of a setup and what I could like to achieve. Does
anyone have suggestions on what is the best way to get the desired
result?
Michael Fuhr <[EMAIL PROTECTED]> writes:
> On Tue, Sep 12, 2006 at 04:46:28PM +0100, Steven Murdoch wrote:
>> Here is an example of a setup and what I could like to achieve. Does
>> anyone have suggestions on what is the best way to get the desired
>> result?
> Use the aggregate over an ordered su
On Sep 12 04:46, Steven Murdoch wrote:
> I would like to concatenate sorted strings in an aggregate function. I
> found a way to do it without sorting[1], but not with.
If the array elements will be made of integers, then you can use sort()
procedure comes with intarray contrib module. For instanc
On Tue, Sep 12, 2006 at 04:46:28PM +0100, Steven Murdoch wrote:
> Here is an example of a setup and what I could like to achieve. Does
> anyone have suggestions on what is the best way to get the desired
> result?
Use the aggregate over an ordered subquery:
SELECT name, trim(concat(code || ' '))
I would like to concatenate sorted strings in an aggregate function. I
found a way to do it without sorting[1], but not with.
Here is an example of a setup and what I could like to achieve. Does
anyone have suggestions on what is the best way to get the desired
result?
Thanks,
Steven.
CREATE TAB