Viewing 15 posts - 721 through 735 (of 1,402 total)
Yes plenty of time. Lots of time. Eons and eons. More than Ten Centuries 🙂 Enough to fill BIGINT. It could be dialed back as appropriate.
February 18, 2021 at 6:14 pm
The place to start imo is with this very awesome article from Jeff. I agree the code is not efficient. The key is to have a 'row goal' in...
February 18, 2021 at 5:50 pm
There were a few issues with the data which required fixing before a query could run. The VARCHAR columns require a character length, in this case I made them both...
February 17, 2021 at 10:43 pm
Hi Lonnie, thanks for the follow up. Since inside the WHILE loop the variable @i represents the theoretical cycle, perhaps it makes sense to change the WHERE clause to
February 16, 2021 at 6:32 pm
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...
February 14, 2021 at 4:19 pm
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)
...
February 12, 2021 at 12:52 pm
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
Viewing 15 posts - 721 through 735 (of 1,402 total)