Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Programming / CLR / October 2008

Tip: Looking for answers? Try searching our database.

multiple-input user defined aggregates

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anonymous - 29 Oct 2008 19:58 GMT
Where can I find a tutorial/samples of "multiple-input user defined
aggregates"?
Bob Beauchemin - 29 Oct 2008 21:32 GMT
Here's one that I wrote for the SQL Server 2008 Jumpstart program. There is
no tutorial other than that UDAs with more than one parameter are supported.
This example also illustrates use of .NET nullable types in SQLCLR. Be
warned that neither multi-input UDAggs or nullable types is supported with
Visual Studio 2008 SP1 auto-deploy. The .sql file to manually deploy and
test it is enclosed.

Hope it gets by the attachment filter on this NG.

Hope this helps,
Cheers,
Bob Beauchemin
SQLskills

> Where can I find a tutorial/samples of "multiple-input user defined
> aggregates"?
Adam Machanic - 30 Oct 2008 00:11 GMT
> This example also illustrates use of .NET nullable types in SQLCLR. Be

Hi Bob,

Interesting examples.  But I'm a bit confused by your use of the nullable
types; why use Nullable<decimal> rather than the decimal? shorthand?
Personally, I've been sticking with the SqlTypes whenever possible, and
teaching the same.  Do you have a preference for one over the other?

--
Adam Machanic
Full-Day SQLCLR Seminar, December 1 2008, Montreal
http://www.devteach.com/PreConference.aspx#PreSQL
Bob Beauchemin - 30 Oct 2008 02:53 GMT
It's written the way it is for exposition. ;-) Some types don't support
SqlTypes (there is no SqlDateTimeOffset, for example). Some (reference types
like string) don't support nullable types. So it's not possible to use only
one or the other.

Cheers,
Bob Beauchemin
SQLskills

>> This example also illustrates use of .NET nullable types in SQLCLR. Be
>
[quoted text clipped - 9 lines]
> Full-Day SQLCLR Seminar, December 1 2008, Montreal
> http://www.devteach.com/PreConference.aspx#PreSQL
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.