Viewing 15 posts - 736 through 750 (of 1,414 total)
To the OP it makes clear sense no doubt. In this case the OP says they have part of the solution but only offer pictures of the problem. Maybe we...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
It seems dfp(start_dt) should've been dfp(dt) in two places. This is a really slow way to debug 🙂
with
dt_cte(dt) as (
select dateadd(month, fn.n, dfp.start_dt)
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Thanks. I'll look at it in a bit more detail later but my first impression is that the following line of code in the CROSSAPPLY is incorrect.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
This seems to return output similar to the picture. Is it just missing a total row? What's not working?
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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(
...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
Viewing 15 posts - 736 through 750 (of 1,414 total)