Viewing 15 posts - 8,176 through 8,190 (of 59,091 total)
On the subject of questions getting worse, here's what it has finally come to. Notice in the zip file that there is absolutely everything that one might need to get...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 9:31 pm
In your case, I would use the ISO-8601 week-date format. You can downoad such a calendar from the internet. The format is yyyyW[0-5][0-9]-[1-7] where the week is 01-53, depending...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 9:08 pm
Sam,
Rewriting to use ANSI Joins instead of older Equi-Joins isn't going to fix it nor the apparent total absence of any indexes to support the code. Returning more than 600...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 7:32 pm
Hi All,
We are trying to creating a clustered idx on a HEAP. It is almost 45 mins, its still running. Heap is around ~400 GB. Is it expected ?...
--Jeff Moden
Change is inevitable... Change for the better is not.
December 7, 2019 at 6:53 pm
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
Viewing 15 posts - 8,176 through 8,190 (of 59,091 total)