SQLCLR .NET Error: Object reference not set to an instance of an object
问题 I am currently receiving an error when trying to execute a simple SELECT statement that references an assembly that contains the C# code for the Jaro-Winkler distance algorithm. This is my first time working with SQLCLRs. I am able to run the code successfully below without the additional OR statement Example: SELECT * FROM USERS WHERE ( DATE_OF_BIRTH IS NOT NULL AND DBO.JAROWINKLER(CONVERT(VARCHAR(6),DATE_OF_BIRTH,12),@DOB) > 0.9 ) OR ( USERID = @USERID ) However when I include the OR