>From the little research I have done, I have not been able to confirm
that MSSQL has UDF for aggregates.

Can anyone confirm this?

Seems that is a some what common task, to generate a list of items for a
report.  Maybe not.

Thanks
MB

-----Original Message-----
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 22, 2003 4:12 PM
To: CF-Talk
Subject: Re: Return Subquery as text string? MSSQL

Mark W. Breneman wrote:

> Is there any way to do this in MSSQL?  Normally you can not return
more
> then one value with type of subquery.
> 
> Here is what I would like to do:
> Select UserID, Name, (select orderNo from orders where OrderID=UserID)
> as Orders
> From Users
> 
> Result:
> 
> "1", "BOB", "12,63,192"
> "2", "Ed",  "34,45,233" 

We should put this in a FAQ, it pops up every other week :-)

You can do this in every DBMS that allows you to create your own 
functions for aggregates. For a PostgreSQL based example, see 
http://www.zope.org/Members/pupq/pg_in_aggregates

Jochem




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com

Reply via email to