Viewing 15 posts - 1 through 15 (of 50 total)
I find that occasionally reading a newspaper or book is like CDs or vinyl albums. An immersive experience in my hands. Nothing digital that disappears when a screen times out....
October 4, 2024 at 12:46 pm
You would probably start with something like this example of a dynamic pivot:
https://www.mssqltips.com/sqlservertip/2783/script-to-create-dynamic-pivot-queries-in-sql-server/
Your MyTable data doesn't match your expected output, but I think the idea that each HH has...
September 13, 2024 at 1:25 pm
Maybe a typo in the explanation highlighted in red below?
What setting of NUMERIC_ROUNDABORT will return an error from this code?
The correct answers are:
SET NUMERIC_ROUNDABORT ON
Explanation
When this is set to
January 15, 2024 at 6:21 pm
Looks like your flag element might be missing a condition. You have:
CASE WHEN C.Fl=1 and C.Grp=1 THEN 1 ELSE 0 END...
December 21, 2023 at 2:33 am
It's fairly hard to tell without tables and data. It doesn't look the query will even run as written.
December 13, 2023 at 7:06 pm
Thank you all
I was exploring the question/solutions and noticed that neither of the queries grouped the March or May records into one monthly total, so they return mutliple records...
June 28, 2023 at 3:07 pm
Is horse stake work comprised of work that requires consumption of a large horse steak?
It's about identifying and eliminating equine vampires.
June 28, 2023 at 2:21 pm
Found a useful tutorial at https://www.youtube.com/watch?v=GlutgLKmyn4
Resets the running total when it becomes negative. I think this works. I added a couple fields to the ridersTest cte, grouped the last query...
June 25, 2023 at 4:42 pm
Drew, thank you for your reply. Your method seems more like what I was looking for. I modified it just a little by adding your final select as a...
June 23, 2023 at 1:43 am
I'm having some difficulty because your sample data and results do not match what is produced by your query. For any situations where timestamps are repeated, like 20-Nov-2022 01:36:02, the...
January 20, 2023 at 8:43 pm
I noticed that the actual answer did not appear in the results. I tried to guess the intent of the question, but was wrong.
There are two results that...
January 20, 2023 at 4:41 pm
To find the percentage of savings you need to SELECT (1785 - 395) / 1785 * 100 or about 78% off.
With implicit conversions, I believe this returns 0. Also,...
November 26, 2022 at 2:11 am
I see this as two parts.
First part is to identify all IT CG combinations that don't have a Week = EOW entry where the EOW is less than the current...
October 7, 2022 at 3:42 pm
I attempted some dynamic code with the thought that Class might be more than the 3 values in sample data. To get an empty string instead of a null, I...
August 22, 2022 at 3:44 pm
In your #Setup, you set some ranges that are rounded to whole dollars with one dollar between ranges, so we have to handle those when using them for calculations. I...
May 2, 2022 at 7:30 pm
Viewing 15 posts - 1 through 15 (of 50 total)