Viewing 15 posts - 1,591 through 1,605 (of 4,085 total)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 25, 2017 at 1:49 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 22, 2017 at 11:47 am
I could have sworn i put a a -1 in the EndDepth..! It's...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 22, 2017 at 10:17 am
When posting, you should provide data in a consumable format, rather that...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 20, 2017 at 1:31 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 20, 2017 at 1:11 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
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 20, 2017 at 12:55 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 18, 2017 at 1:08 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 18, 2017 at 12:51 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
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,...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 15, 2017 at 8:19 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
September 14, 2017 at 7:44 am
Viewing 15 posts - 1,591 through 1,605 (of 4,085 total)