Viewing 15 posts - 6,226 through 6,240 (of 59,101 total)
I was thinking more about this - realized we can do this:
SELECT weekend_day_count=y/7-x/7+(y+1)/7-(x-1)/7
FROM (VALUES(DATEDIFF(DAY,-53690,'1899-01-01') + 1,DATEDIFF(DAY,-53690,'1900-01-14') + 1))x(x,y)
We can specify the anchor date as 1753-01-01 (-53690) and then add...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 23, 2020 at 12:34 pm
Just curious... where are the original "from" and "to" values coming from? I ask because, if we know that, we might be able to...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 22, 2020 at 9:07 pm
Just a shot in then dark (which I can help with), does anything in the job make a call to xp_CmdShell?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 22, 2020 at 8:27 pm
We had the switch upgrade right before the backup started taking long time to finish.
I'm thinking that you've just identified your problem with the backups. 😉
Have the check the...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2020 at 9:48 pm
No, the backup is not broken into several files, we can try to do that.
As you said, you didn't have this problem just a little bit ago. I'm with...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2020 at 7:35 pm
here is a nice discussion about it all "Mixed Extents: 02 - Indexing and Stats Maintenance"
I saw that. It's a shame that they didn't get into the Index...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 21, 2020 at 6:43 pm
I ran the update stats on a table by creating the indexes, when i checked after executing the update stats the query performance is degraded , may i know...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2020 at 3:47 pm
On the subject of "performance", trailing and mid-string lookups are terrible. If you have to do this more than once, consider another method especially if the data is relatively static. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 20, 2020 at 2:19 pm
The article says that "When a CSV file longer than that is opened, the bottom rows get cut off and are no longer displayed."
Did Excel provide any warning that...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2020 at 7:15 pm
I'll file a note to list allowed types. I think it's a short list, so this shouldn't be hard.
It also seems strange to me that a good number of...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2020 at 7:09 pm
Any chance you could include all of the code from the variable (as code, not a graphic, please) that gets executed so I can have a look?
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2020 at 5:57 pm
8<
I also have been known to use xp_CmdShell to work some serious magic for things like file prep (especially on CSVs), file handling (find it, use it, move...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 19, 2020 at 5:38 pm
Just to be sure, Jacob... I really like your solution (especially since I've tested the bejeezus out of it in the area of functionality) because of the integer math, lack...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2020 at 5:11 pm
To Frederico's good point, please see the following article for an introduction to "Tally Tables" (also known as "Numbers" tables). Keep in mind that it's only an introduction and do...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 18, 2020 at 4:58 pm
I use Google...
https://weblogs.sqlteam.com/peterl/2009/07/12/how-to-calculate-the-number-of-weekdays-for-any-given/
That, however, doesn't count the number of weekend days as the OP requested. It wouldn't, however, provide much difficultly to the OP to realize that if you...
--Jeff Moden
Change is inevitable... Change for the better is not.
October 17, 2020 at 7:35 pm
Viewing 15 posts - 6,226 through 6,240 (of 59,101 total)