Viewing 15 posts - 736 through 750 (of 1,424 total)
A middle way could be to use the very nice integer division Jeff uses for the time parts but then use framework functions to handle type conversions and calculation. Supposedly,...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
One "brute force" way to do this would be to expand all the date ranges and use the set operator EXCEPT to remove the (also expanded) gaps. Then the results...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
To generate a sequence why not use an explicit virtual table of the numbers themselves? Here's a .txt file with a sql script and it defines a tvf called dbo.fn1k...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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.
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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...
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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
Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können
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
Viewing 15 posts - 736 through 750 (of 1,424 total)