PCB MS SQL CLR aggregation function (function, call order, number of calls) CLR description

Source: Internet
Author: User

Using the CLR to write functions: scalar functions, table-valued functions are well understood, if the aggregate function is not so well understood,

Here is a description of the CLR function, in fact, the key is to explain the aggregate function

Using the CLR to write aggregate function keys is to understand how the CLR interacts with SQL for data,

The first step: the function of the functions in the aggregation function

Step Two: aggregation function call order

Step three: The number of times the aggregate function is called in the actual SQL

Note: When you are transferring CLR variable data, the data type is an object or list, please convert when the Write method is good, if the terminate conversion will give an error.

The correct conversions are as follows:

        /// <summary>        /// Write         /// </summary>        /// <param name= "W" ></param>         Public void Write (System.IO.BinaryWriter W)  //2        {            w.write (string . Join (Separate_, Valuelist.orderby (TT = Tt.orderno). Select (TT = tt.itemstring). ToArray ()));            W.write (Separate_);        }

PCB MS SQL CLR Aggregation functions (function, invocation order, number of calls) CLR description

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.