SyntaxFix
Write A Post
Hire A Developer
Questions
You can define a variable @Result to fill your data in it
@Result
DECLARE @Result AS INT IF EXISTS (SELECT * FROM tblGLUserAccess WHERE GLUserName ='xxxxxxxx') SET @Result = 1 else SET @Result = 2