Viewing 15 posts - 751 through 765 (of 13,838 total)
Steve, please excuse me for being obtuse, but what did you mean by, "... one thing I'd recommend is make a REPO to keep your code review checklists"? I'm...
October 17, 2023 at 1:07 pm
The non-PIVOT solution works fine, and I should have thought of it.
Just curios though. Could the same thing be done with less code using PIVOT?
If you are simply trying...
October 17, 2023 at 6:49 am
This function might help you: https://www.sqlservercentral.com/scripts/patexclude8k
October 16, 2023 at 4:19 pm
What sort of input? A file?
October 16, 2023 at 10:08 am
I'm working on this very topic, so this article was timely.
There is a statement in the article: "The template parameters can be overridden as required" which may not be as...
October 16, 2023 at 8:11 am
Your DISTINCT, as written, applies to the entire combination of (P0ISBN, p0CHN, P0WEDT, P0ADAT), not only to the date.
If you provide your data in a consumable format, someone here will...
October 14, 2023 at 9:32 am
sorry my bad. I want top 1o maximum total due based on the customer id based on the year
Difficult to write this query without some sample DDL and data.
But...
October 12, 2023 at 2:49 pm
You want the top 10 for each year, or just the top 10 for eternity?
(I ask, because your sample code references YEAR(OrderDate) all over the place, though you do not...
October 12, 2023 at 12:26 pm
All of the dis values in your sample data are different, so therefore grc will always be zero. Your sample results therefore do not match your written logic. Please clarify.
October 12, 2023 at 8:43 am
You've declared a CTE, but then you do nothing with it.
Add SELECT * FROM MissingAttendance, for example, at the end and it should be fine.
October 11, 2023 at 5:01 pm
Thanks for your feedback Phil,
The reason for the layout of my sample data was just for simplicity. I inserted my sample data into a physical table and then just...
October 11, 2023 at 3:24 pm
What tools are you using to deploy and to generate the delta?
October 11, 2023 at 2:08 pm
For the benefit of others, here is a consumable (and simplified) version of your set-up code. Please note in future how dates should be in 'YYYYMMDD' format (no need to...
October 11, 2023 at 1:57 pm
Does this help? It relies on Jeff Moden's infamous splitter which, given the number of points you have, I imagine you've heard of.
DROP TABLE IF EXISTS #PipeStringTemp;
CREATE...
October 11, 2023 at 1:33 pm
This does not appear to be a SQL Server post.
Also, is it a blog post, or do you have a question to ask?
If you expect a coded answer, please provide...
October 11, 2023 at 1:09 pm
Viewing 15 posts - 751 through 765 (of 13,838 total)