Viewing 15 posts - 721 through 735 (of 1,396 total)
dfp(start_dt) is (or was intended to be) the alias (with column label) for the object defined by the VALUES table value constructor. It appears there some were missing parentheses in...
February 12, 2021 at 11:48 am
By "regroup" does it mean "round and expand"? Otherwise, how to handle the decimal precision? To create 1 foot increments based on rounded ranges you could use a tally...
February 12, 2021 at 3:54 am
ktflash, afaik it's almost a correct "quick fix". TBL1 is a recursive CTE which generates a sequence of months (1 to 12). Presumably this date range is to be adjusted...
February 11, 2021 at 2:53 pm
DATEPART(ISO_WEEK, @thedate) ???
Afaik this helps going in the other direction, from @thedate to iso week. What about iso week, iso month, iso year to calendar date?
February 8, 2021 at 6:55 pm
Is this still the best way to do this in 2021? Google landed me at another SSC Forum from 2005, which I can't find anymore, and now I'm...
February 8, 2021 at 2:50 pm
Is this still the best way to do this in 2021? Google landed me at another SSC Forum from 2005, which I can't find anymore, and now I'm using this
February 8, 2021 at 2:18 pm
This seems to return output similar to the picture. Is it just missing a total row? What's not working?
February 4, 2021 at 8:29 pm
You could unpivot both tables and inner JOIN them. Here's an example based on another forum question/answer. Something like this
drop table if exists #tTableA
go
create table #tTableA(
...
February 3, 2021 at 7:26 pm
It was very quick, and I knew about it yesterday, but didn't really do much other than give a vote to try. Still amazed it happened.
Comments, suggestions, feedback on...
February 3, 2021 at 2:26 pm
The queries ends up wrapping a DataReader in .Net 5, which although technically are created to handle SELECT statements better, still works perfectly for also INSERT/UPDATE/DELETE statements, but you...
January 31, 2021 at 1:53 pm
It's an interesting approach. There are a few questions that jump out tho. There's no mention of how DML statements like INSERT/UPDATE/DELETE are handled? Could it execute stored procedures? How...
January 30, 2021 at 9:23 pm
You know that the LAST_VALUE() is NEVER going to be before the CURRENT ROW, so it's completely unnecessary to specify the beginning of the window as UNBOUNDED PRECEDING when...
January 29, 2021 at 2:20 pm
This is sort of confusing because the ORDER BY of the outermost query includes the 'head' column as well as 'Trans_ID'. The SUM OVER ORDER BY is only by '(select...
January 26, 2021 at 8:13 pm
This comes really close. It uses a FULL JOIN which is functionally both a LEFT JOIN and a RIGHT JOIN. It seems the example Status_ToolType column might have some consistency...
January 24, 2021 at 10:17 pm
Viewing 15 posts - 721 through 735 (of 1,396 total)