Viewing 15 posts - 166 through 180 (of 1,479 total)
I'm not sure that I understand you correctly, but if I do, then you just need to check if you have the value 0 in totalhighprtjobs column. Something like...
January 9, 2014 at 3:06 am
You don't need to use the over clause. You can just use group by instead:
WITH myMainTable AS
(SELECT 1 AS obj_id, 'A' AS obj_desc
UNION ALL
SELECT 2,'B'
UNION ALL
SELECT 3,'C'
UNION ALL
SELECT 4,'D'
UNION...
January 8, 2014 at 4:25 am
Akayisi (1/7/2014)
Thanks a lot by the way i guess this is also workingselect 'ALTER INDEX '+sys.indexes.name+ ' ON '+sys.tables.name+' rebuild' from sys.indexes,sys.tables
where sys.indexes.object_id=sys.tables.object_id
and
sys.indexes.name is not null
This can work...
January 7, 2014 at 10:40 am
I've noticed that in your query you wrote the name Model. If the server is case sensitive, you won't find the model database if you'll use a capital later....
January 7, 2014 at 7:29 am
Here is one way of doing it:
select 'alter index [' + si.name + '] on [' + schema_name(so.schema_id) + '].[' + so.name + '] rebuild with (online = on)'
from sys.indexes...
January 7, 2014 at 7:18 am
caippers (1/6/2014)
I'm sure my company would love me saying that on day 3....
You mean that you didn't say it already at day 1?:-)
Adi
January 6, 2014 at 10:28 am
I admit that it's been a long time since I've worked with the maintenance plan wizard, but when I did work with it, I found out that most times it...
January 6, 2014 at 10:01 am
For such small amount of records per day, I'd do it as simple as possible – One table for all days. By the way I don't think that having...
January 1, 2014 at 1:10 am
I think that the problem is with the query that you are using for the alert. The DMV sys.dm_exec_query_memory_grants has records for memory grants that are waiting and...
January 1, 2014 at 12:39 am
I didn't check it (next time pleas write a script that creates the table and inserts the data), but I think that the query bellow will do it for you:
select...
December 31, 2013 at 7:23 am
Grant Fritchey (12/18/2013)
To understand the differences, look to the properties. I have both plans using...
December 19, 2013 at 12:44 am
I don't think that it has anything to do with determinism. In both queries the query gets 1 value (once as a variable and once as an expression)....
December 18, 2013 at 10:31 am
Actually with a variable the server doesn't know what value will be used. This is one of the differences between variable and parameter. It can do parameter...
December 18, 2013 at 8:18 am
By not working, I assume that you get null value from the isnull function. Most chances are that you have some records that both columns have null values. ...
November 19, 2013 at 2:22 am
You have to understand that the sub query is connected to the outer query. Take a look at this query:
SELECT temp_int_field, temp_varchar_field
FROM #temp WITH(NOLOCK)
WHERE temp_int_field IN (SELECT sub_table_int...
November 18, 2013 at 8:53 am
Viewing 15 posts - 166 through 180 (of 1,479 total)