Viewing 15 posts - 4,396 through 4,410 (of 59,087 total)
I have such an issue. I have units, on sale date and also how many weeks the unit is on sale. However, my current formula with DATEDIFF grabs only...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 7:10 pm
Just one more thing... The example above spans 29 months. Is there a good way to separate it out to place three columns for each month within the date...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 7:08 pm
Phil:
Happy to comply, but I'm not sure I know how to do those things. I will try to figure it out.
Other sites have controls for these things, which I...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 7:05 pm
I totally agree that tables scans are bad but adding OPTION(RECOMPILE) to every CATCH-ALL query is a really bad thing. And, you state the truly obvious when you say anything...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 6:33 pm
The difference of bad data before and after computers is that bad data in computers can be perpetuated and disseminated so much faster.
And that more people believe the bad...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 6:23 pm
Hi Jeff,
Good questions Jeff, its in development so not sure exactly what to do with results yet?
If Client has only one row then leave it out of the results...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 5:01 am
Well, this is interesting. SQL 2022. No more parameter sniffing?
Heh... nothing could go wrong there, right? 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
November 3, 2021 at 12:38 am
Sorry... post withdrawn. Wrong post.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 9:14 pm
Actually you could be causing a performance problem by getting SQL to use the same query plan for different values, i.e., by avoiding the "overhead" of a...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 8:36 pm
I'd love to see a generic framework/example for this, even if the OP has left the building.
I know your preference for datetime over datetime2, but would also be interested...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 8:31 pm
Actually you could be causing a performance problem by getting SQL to use the same query plan for different values, i.e., by avoiding the "overhead" of a recompile. The...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 8:16 pm
The example is for a query called by the Customer List page of the web application. It will execute 1000's of times a day.
In that case, please see the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 3:53 pm
Any interest in your own problem that you posted?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 3:16 pm
The common name for such a query is a "Catch-All" query and "It Depends" strongly comes into play here. How often will this query be executed?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 3:07 pm
If you are planning for large amounts of data you might be interested in some 'light' reading:
https://www.itprotoday.com/sql-server/interval-queries-sql-server
Itzik's article is fantastic but I hope that doesn't scare off the...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 2, 2021 at 2:42 pm
Viewing 15 posts - 4,396 through 4,410 (of 59,087 total)