Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
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 PROCEDURE [dbo].[TEL_SelectCountInVoiceChecked] @ColumnName1 nvarchar(255)= NULL, @TableName varchar(100) = NULL, @Value varchar(100) = NULL AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @SQL NVARCHAR(MAX) SET @SQL = 'SELECT COUNT (*)' SET @SQL = @SQL + ' FROM [dbo].[' + @tableName + ']' IF @ColumnName1 <> '' SET @SQL = @SQL + ' WHERE ' + CAST(@ColumnName1 AS NVARCHAR(30))+ '' +'=' + CAST(@Value AS NVARCHAR(30)) SET @SQL = @SQL EXECUTE (@SQL) END