Viewing 15 posts - 571 through 585 (of 7,187 total)
It was that long list of table joins without a line break that spooked me!
Here are the changes I made:
(1) COALESCE instead of CASE makes the code...
November 26, 2018 at 9:02 am
Please post your code your code (and for the sake of your colleagues and future self, lay it out) in a format that's easy to read. It's difficult for others...
November 26, 2018 at 7:42 am
My suggestion is not to call jobs from triggers. What happens if a job is already running when the trigger that calls it fires? What if SQL Server Agent is...
November 22, 2018 at 4:45 am
You've posted in the SQL Server 2008 forum. Is that the actual version you're using? If so, I don't think there's anything you can do, short of capturing all plans...
November 19, 2018 at 9:45 am
The creation_time column - is that what you're looking for?
John
November 19, 2018 at 9:30 am
You've posted in the SQL Server 2008 forum - is that the actual version you're using? If you're on SQL Server 2012 or above, you can use TRY_CONVERT. If you...
November 19, 2018 at 4:37 am
November 19, 2018 at 2:38 am
Understood, but if it were me I'd rather prevent any anomalies than try to capture and correct them after the fact. In the worst case, there could be hundreds or...
November 16, 2018 at 5:40 am
If you're deleting 20 million rows one at a time, of course it's going to be slow. Do it in one go - that's what RDMSs are designed for. If...
November 16, 2018 at 4:41 am
Your programmers ought to be in the habit of adding comments to an object definition every time they create or alter it. You can quality check this yourself, since you...
November 14, 2018 at 9:51 am
Save it as a .sqlplan file and attach it to your post.
John
November 14, 2018 at 7:15 am
I don't know whether automatic failback is even a thing. But even if it were, how would you want it to work - for failback to occur immediately the primary...
November 14, 2018 at 7:09 am
Why are you doing this row by row instead of as a set.
When you insert a NULL value, it doesn't have inverted commas round it in the INSERT...
November 14, 2018 at 4:52 am
Yes, or create the temp table before you start, instead of doing a SELECT INTO. I always think that's safer.
John
November 14, 2018 at 4:49 am
Do you have an actual execution plan from a long-running delete that you could post here, please?
John
November 14, 2018 at 4:47 am
Viewing 15 posts - 571 through 585 (of 7,187 total)