Viewing 15 posts - 1,591 through 1,605 (of 4,087 total)
September 27, 2017 at 9:50 am
In that case, you want to use a recursive CTE. I don't have the time right now to look at it.
Drew
September 26, 2017 at 9:02 am
LEAD/LAG will not work, because you need to specify the distance from the current row, and the distance isn't constant. You also made it more difficult to see the correct...
September 25, 2017 at 1:49 pm
September 22, 2017 at 11:47 am
I could have sworn i put a a -1 in the EndDepth..! It's...
September 22, 2017 at 10:17 am
When posting, you should provide data in a consumable format, rather that...
September 22, 2017 at 9:07 am
I updated this to remove an expensive sort. The SUM was sorting ascending by the date, but the...
September 20, 2017 at 1:31 pm
There is a third option. I don't have the time right now to do a comparison.
select (serno * 100) / NULLIF(100 - bargain, 0) from yachtm
September 20, 2017 at 12:55 pm
September 18, 2017 at 1:59 pm
In order for the CROSS APPLY to replicate ROWS UNBOUNDED PRECEDING, you'll need a triangular join. You're better off using a quirky update in SQL 2008.
Drew
September 18, 2017 at 1:08 pm
September 18, 2017 at 12:51 pm
September 15, 2017 at 2:41 pm
That's way too many reads (12) on the base table. Here is an approach that requires only ONE read.
;
WITH Ordered_Appts AS
(
SELECT *,
DATEADD(MONTH,...
September 15, 2017 at 8:19 am
September 14, 2017 at 7:44 am
Viewing 15 posts - 1,591 through 1,605 (of 4,087 total)