Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
ALTER proc spPrincipalTest ( @uid varchar(30) ) as DECLARE @ufilter nvarchar(200) DECLARE @uexpdate datetime DECLARE @CMD nvarchar(200) select @ufilter=ufilter, @uexpdate=uexpdate from UFILTERS where uid=@uid Print @ufilter IF ISNULL(@ufilter, 'ZZTOP') = 'ZZTOP' BEGIN select * from dvASTUCurrentShort where 1 = 2 END IF @ufilter = 'NONE' BEGIN select * from dvASTUCurrentShort order by Lastname, Firstname END ELSE BEGIN set @cmd = 'select * from dvASTUCurrentShort where ' + @ufilter print @cmd exec sp_executesql @cmd, @ufilter END Output: schoolnum='032' select * from dvASTUCurrentShort where schoolnum='032' Incorrect syntax near 'schoolnum'. No rows affected. (0 row(s) returned) @RETURN_VALUE = 0 Finished running [dbo].[spPrincipalTest].
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.