Reputation: 10243
I've created my first CLR table valued function. The steps I went through were:
Create function -
CREATE FUNCTION MyFunction(@input nvarchar(max)) RETURNS Table( -- columns ) AS
EXTERNAL NAME [Assembly Name Here]. [Class Name Here] . [Static Function In Class Here]
I recall reading something where I had to also copy the dll into the binn directory below MSSQL.
My questions are:
Upvotes: 0
Views: 316
Reputation: 37364
You don't need to copy dll; once the library is loaded, you don't need the external file.
Your steps look good to me, but you might want to add "Testing deployed function" to your steps.
Also, for SAFE
permissions you can omit WITH PERMISSION_SET = SAFE
.
Upvotes: 1