T SQL Check if Null. IF @FilterText IS NOT NULL BEGIN SELECT @SQLString = 'DELETE FROM ' + @TableNameText + ' where ' +@FilterText EXEC(@SQLString) END