Russ wrote:
> What I actually wanted was a list of all someotherID's for a someID in a
> single column.  I found a function that sort of does this (Coalesce), and
> after digging up my old code, did it using temp tables and cursors.  
> 
> I was optimizing code that was doing it in CF and was taking a little too
> long to run for my taste.  

If your database is extensible you can write your own aggregate function for 
that. For instance, in PostgreSQL that would be something like:
CREATE AGGREGATE gr_aggr (
  sfunc = array_append,
  basetype = anyelement,
  stype = anyarray,
  initcond = '{}'
);

SELECT id, gr_aggr(val)
FROM table
GROUP BY id;

Jochem

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248875
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to