Can't update UDF's created for SqlClr

dkentdkent Posts: 4
edited June 27, 2007 12:48PM in SQL Compare Previous Versions
I am unable to update the UDF's created by the Visual Studio 2005 deployment of SqlClr code. Any idea what's going on? Thanks.

Using SQL Server 2005, RedGate 5.3.0.44.

Here is the error:
The following error message was returned from the SQL Server:

[1001] Line 1: Length or precision specification 0 is invalid.
Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.
Incorrect syntax near the keyword 'EXTERNAL'.

The following SQL command caused the error:

CREATE FUNCTION [dbo].[fnIntegerListToTable] (@list [nvarchar] (0))
RETURNS TABLE (
[number] [int] NULL)
WITH EXECUTE AS CALLER
EXTERNAL NAME [SwSqlClr].[UserDefinedFunctions].[InitIntegerListToTable]

The following messages were returned from the SQL Server:

[5701] Changed database context to 'ESPIntegration'.
[5703] Changed language setting to us_english.
[0] Dropping [dbo].[DelimitedList_Concat]
[0] Dropping [dbo].[DelimitedList_Space]
[0] Dropping [dbo].[DelimitedList_Comma]
[0] Dropping [dbo].[fnConvertBase64ToBinary]
[0] Dropping [dbo].[fnStringListToTable]
[0] Dropping [dbo].[fnBankersRound]
[0] Dropping [dbo].[fnIntegerListToTable]
[0] Dropping CLR assemblies
[0] Creating CLR assemblies
[0] Creating [dbo].[fnIntegerListToTable]


Here is the text of the UDF it is trying to deploy:
USE [ESP]
GO
/****** Object:  UserDefinedFunction [dbo].[fnIntegerListToTable]    Script Date: 06/11/2007 16:00:11 ******/
ALTER FUNCTION [dbo].[fnIntegerListToTable](@list [nvarchar](max))
RETURNS  TABLE (
	[number] [int] NULL
) WITH EXECUTE AS CALLER
AS 
EXTERNAL NAME [SwSqlClr].[UserDefinedFunctions].[InitIntegerListToTable]

Comments

Sign In or Register to comment.