title: SQL-Server - Operand type clash: uniqueidentifier is incompatible with int
body: <p>When I am executing this code I am having this error. <strong><em>Operand type clash: uniqueidentifier is incompatible with int</em></strong> . What are the solutions to remove this error please? Thanks</p>
  
  <pre><code>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
  </code></pre>