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.
-
Create the .Net code necessary
-
Create a CLR script for compilation
-
Compile the CLR
-
CREATE the ASSEMBLY
-
CREATE the PROCEDURE
-
Call the procedure
-
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.