select * from( select t1.name,datediff(MONTH,GETDATE(),cast(MAX(value) as datetime)) diff,MAX(value) value from ACCOUNTCHECK.sys.partition_range_values t with(nolock) inner join ACCOUNTCHECK.sys.partition_functions t1 with(nolock) on t.function_ ...
↧