Code: Select all
[SqlFunction(
FillRowMethodName = nameof(FillRow)
)]
public static IEnumerable TestTVF(string a, string b, int c)
{
IEnumerable l = new List { 1, 2, 3, 4, 5, 6};
return l;
}
public static void FillRow(object o, out int test)
{
test = (int)o;
}
Code: Select all
CREATE FUNCTION dbo.TestTVF(@a NVARCHAR(MAX), @b NVARCHAR(MAX), @c INT)
RETURNS TABLE (
test INT
)
AS EXTERNAL NAME RegexSQLCLR.[RegexSQLCLR.RegexSQL].TestTVF
CREATE FUNCTION für „TestTVF“ ist fehlgeschlagen, weil T-SQL- und CLR-Typen für den Rückgabewert dies tun stimmt nicht überein.
Das ist nicht der Code, den ich möchte, aber selbst diese einfache Implementierung funktioniert bei mir nicht. Was mache ich falsch?