You should drop the first "RETURN @Cnt" line
You can also try with a CTE :
DECLARE @month TINYINT
SET @month = 1;
SELECT DATEADD(month, @month,...
IF @meas_compare_type = NULL => IF @meas_compare_type IS NULL
NULL is not a value, it is the absence of value. NULL is even not equal to NULL...
You can take a look at this :
You will need to replace :
I give you the JOIN statement, you now just have to get the columns ;
FROM sys.indexes IDX
If you are under SQL Server 2005, why continue to use sys.syscomments or INFORMATION_SCHEMA.ROUTINES instead of sys.sql_modules ?...
Check in sys.allocation_units or use sp_spaceused system stored procedure [;)]
You can see all the sys schema views by expanding the Database/Views/System Views [;)]
OK, I understood what you need :
SET NOCOUNT ON
-- Assume that your values are in the @Test table variable; you can replace it by the column of your...
SELECT HOST_NAME() [;)]
The maximum value of the last set of values you gave is 1.4 ...
I do not understand your question ...
You should request the sys.dm_db_index_physical_statsDMV, which is very useful to know about fragmentation of your indexes; It will help you...
Separate names with a comma.