Making A CLR Function

Kevin Feasel

2017-07-21

CLR

Michael Bourgon walks us through creating a CLR function:

What we settled on was building a CLR that would make the web calls, feeding it our data via a FOR JSON query.  We would then log the results into a separate table to make sure everything worked as expected.  I made this as generic as possible so that others could use it.

So let’s go through the steps.

  1. Create the .Net code necessary

  2. Create a CLR script for compilation

  3. Compile the CLR

  4. CREATE the ASSEMBLY

  5. CREATE the PROCEDURE

  6. Call the procedure

  7. Run it automatically

For a more detailed look at building a CLR function, after you go through Michael’s post, check out Solomon Rutzky’s Stairway to CLR.

Related Posts

Using CLR To Call HTTP Endpoints From T-SQL

Jovan Popovic shows how to use cURL from within SQL Server with the CLR: This code will add one function and one procedure in SQL Server that implements the following CURL functions: CURL.XGET – function that calls API on some http endpoint using get method and fetches the response. It has two parameters: @H representing the header […]

Read More

SQLSharp 4.1 Released

Kevin Feasel

2018-02-13

CLR

Solomon Rutzky announces a new release of SQL#: GENERAL Greatly reduced size (by approx. 310 kb) of main SQL# Assembly by moving LookUp category into its own Assembly: SQL#.LookUps. This will improve initial load times and won’t waste much memory when not using the LookUp functions. Installation Script Account for security changes related to SQL […]

Read More

Categories

July 2017
MTWTFSS
« Jun Aug »
 12
3456789
10111213141516
17181920212223
24252627282930
31