Viewing 15 posts - 2,341 through 2,355 (of 7,191 total)
You're looking for times that are between ShiftStart and ShiftEnd. However, if ShiftStart is after ShiftEnd, as it is in your first two rows, that condition will never be...
August 22, 2016 at 4:11 am
You need to declare @result at the start of your code and reverse the order of the variables in the last line. Example C on this page shows you...
August 19, 2016 at 2:24 am
Put all the users into a domain group. Give that group write access on the folder from which the file is imported. Change the job so that it...
August 19, 2016 at 2:10 am
Just before the table is truncated, use the index use DMVs to find out which are the most useful indexes. Do this on several consecutive days, until you've got...
August 18, 2016 at 4:58 am
If you're truncating your table every day then you're starting with an empty table. I can't think of any reason, therefore, why you'd want to rebuild your indexes at...
August 18, 2016 at 3:53 am
When do you get those messages - is it when you try to disable the job schedule from within a jobstep in the job? Why not just set the...
August 15, 2016 at 9:53 am
I'm going to have to disagree there, I'm afraid. Suppose the query had originally been written with an outer join, with the filter (quite correctly) in the join predicate,...
August 15, 2016 at 9:45 am
There's no difference. But don't take my word for it - compare the execution plans and see for yourself.
Now, if the join were an outer (instead of inner) join,...
August 15, 2016 at 8:36 am
If you don't have a backup, and you didn't have the job scripted out, then I'm afraid you've lost it. The sysjobhistory entries will only show that the job...
August 15, 2016 at 6:00 am
Jeff
Does your job highlight just jobs that failed, or does it include those that didn't run, perhaps because they were accidentally disabled, or because SQL Server Agent wasn't running?
I think...
August 15, 2016 at 2:22 am
Since included columns don't form part of the actual index key, it's unlikely they'll be useful in WHERE clauses, JOINs and so on. What they are useful for is...
August 12, 2016 at 9:55 am
I still can't get it to work on my data set - I've clearly done something wrong, and I don't really have time to investigate. Looks like I've been...
August 12, 2016 at 9:47 am
WITH -- Itzik Ben-Gaan's virtual tally runs fastest and I don't know why.
L0 AS (SELECT con vert(int, 1) AS C UN ION ALL SELECT con vert(int,1)),--2 rows
L1 AS (SELECT 1...
August 12, 2016 at 7:35 am
Ah yes - good spot! It still gives totally different results from the other queries, though - possibly because of those pesky time portions that you mentioned.
John
August 12, 2016 at 4:43 am
The Dixie Flatline (8/11/2016)
;with Eomonths (Eom) as (select top(500) EoMonth(DateAdd(MONTH,(N-1),'1/1/2016')) from tally)
select Eom as Check_date, Total
from...
August 12, 2016 at 3:53 am
Viewing 15 posts - 2,341 through 2,355 (of 7,191 total)