Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 User-defined aggregate functions?

Author  Topic 

Dev Null
Starting Member

39 Posts

Posted - 2004-08-19 : 03:05:52
Can I write my own aggregate functions somehow?

User-defined functions is easy enough, but it would be really handy to, say, write a modified-mean function and then be able to:
SELECT mod-mean(score), type from scores group by type

I suspect I can't, since I'd need some way to pass the result sets from the group by to my function, but you guys are clever... anybody know if it can be done?
   

- Advertisement -