When I am executing this code I am having this error. Operand type clash: uniqueidentifier is incompatible with int . What are the solutions to remove this error please? Thanks
CREATE FUNCTION [a01].[udf_isUserActive]
(@AccountID INTEGER)
RETURNS BIT
AS
BEGIN
IF (EXISTS (SELECT accountID
FROM [a01].[tbl_userAccounts]
WHERE accountID = @AccountID
AND isActive = 1))
RETURN 1;
RETURN 0;
END;
GO
accountIDis presumablyuniqueidentifiernot integer. - Martin Smith