Viewing 15 posts - 8,161 through 8,175 (of 59,072 total)
Be REALLY careful with the code posted so far (all of it... the original post and all coded answers). It contains a Triangular Join and that's a huge drain on...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 6:31 pm
Team
I have a scenario in SQL Query. If I Give a day, The output should say which day and how many days crossed in a given month
For Ex
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 3:10 am
DECLARE @dDate DATE = '11 Dec 2019'
SELECT DATENAME(DW, @dDate), (DAY(@dDate) / 7) + 1
Try the date of '7 Dec 2019' and see that it comes up...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 3:04 am
Team
I have a scenario in SQL Query. If I Give a day, The output should say which day and how many days crossed in a given month
For Ex
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 2:45 am
This is like fixing bad parameter sniffing. In order for the execution plan to change, there had to be a recompile. Causing a recompile is frequently the fix for bad...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 1:25 am
hi ,
i getting result of query 65954 rows its take 20 seconds how i can i make query fast.
It's easy... just hit the "Go faster" button.
Its Solved i...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 12:56 am
if you look at recursive CTEs you can build a list of dates within your boundaries
then use SELECT DATEPART (DAY,GETDATE()) and exclude the Saturday and sunday values then...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 12:44 am
I've not checked but even if the documentation and every MVP in the world said "Yes, that'll work", I'd try it on a couple of test systems first. My recommendation...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 6:46 pm
You also have to remember that, on sys.dm_db_index_usage_stats, things may not be as they seem. For example, you might have 1 "UserRead" (UserSeek, UserScan, UserLookup) per day and tens of...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 6:28 pm
We had a person at my old job. She was ALWAYS on the phone. I got curious as to why and so I discreetly "hung around" for a...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 6:07 pm
The exception to that is matching queries to perfmon counters. They still can't do that in ExEvents.
One of my favorite bosses in times past had a wonderful saying that...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 4:17 pm
Just to add to what John has stated, I've found that a lot of the code that fails really needs a rewrite anyway. If you can't fix a piece of...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 3:29 pm
Oh yeah... almost forgot... a "Coding'n'Formatting" standard goes a hell of a long way when it comes to readability during troublshooting or modifications. I do 100% peer reviews for the...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 3:25 pm
The flower box in code is absolutely essential and just about the only place where documentation won't accidentally get lost. Someone would have to make an effort to delete it. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 3:20 pm
oooh points, that gamification that gives you a sense of achievement on a website. sadly it's quite a hook for newbies, but you get a lot of "trawlers" that...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 6, 2019 at 2:59 pm
Viewing 15 posts - 8,161 through 8,175 (of 59,072 total)