Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
USE [ASSETMNT] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER procedure [dbo].[myTest] @UserEmail varchar(50), @IsSuperUser INT as begin SET NOCOUNT ON; DECLARE @esql NVARCHAR(max) DECLARE @ssql NVARCHAR(max) DECLARE @EBOO VARCHAR(8) DECLARE @SBOO VARCHAR(8) DECLARE @ECOUNT VARCHAR(8) DECLARE @SCOUNT VARCHAR(8) SET @EBOO = ('FALSE') SET @SBOO = ('FALSE') SET @esql = 'SELECT COUNT(UEMAIL) =' + @ECOUNT + ' FROM TBL_USERS WHERE UEMAIL =' +@UserEmail SET @ssql = 'SELECT COUNT(SuperUser) ='+@SCOUNT+' FROM TBL_USERS WHERE SuperUser = 1' IF @SCOUNT > 0 SET @EBOO = ('TRUE') IF @ECOUNT > 0 SET @EBOO = ('TRUE') exec sp_executesql @esql,@ssql return 1 end
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.