SQL Compare

Latest version: 10.0

SQL Compare

Knowledge Base

Support for 'returns NULL on NULL Input' in CLR functions (version 5)

Category: Troubleshooting & error messages
Date: 05 Jun 2009
Product: SQL Compare
Versions: 5.x
Fix Version: 6.0

SQLCompare realizes when one user defined Function (udf) written in T-SQL holds the "with null input returns null input" clause and the same udf on another server does not, but this does not work correctly for CLR functions.
 
ALTER FUNCTION [dbo].[udf_ComputeLuhn](@cardNo [nvarchar](4000)) RETURNS [nvarchar](4000) WITH EXECUTE AS CALLER, RETURNS NULL ON NULL INPUT AS EXTERNAL NAME [CardServer].[UserDefinedFunctions].[udf_ComputeLuhn]

And the function on the server to be compared looks like:
ALTER FUNCTION [dbo].[udf_ComputeLuhn](@cardNo [nvarchar](4000)) RETURNS [nvarchar](4000) WITH EXECUTE AS CALLER AS EXTERNAL NAME [CardServer].[UserDefinedFunctions].[udf_ComputeLuhn]

the missing "Returns null on null input" is not recognized by SQL Compare.

This issue has been addressed in SQL Compare 6.0. Upgrading will resolve this issue.

Document ID: KB200707000068 Keywords: SQL, Compare, CLR, UDF, function, NULL, input

Was this article helpful?

Search support
Forums
Visit the SQL Compare forum.

SQL Compare

all SQL products

all products