Viewing 15 posts - 1,666 through 1,680 (of 4,086 total)
The main issue is that the intervals in your second table aren't packed. Here is an article that discusses Packing Intervals.
The approach I took was to pack...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 3, 2017 at 12:32 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 3, 2017 at 7:10 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 2, 2017 at 2:26 pm
Here are two options: one using SUBSTRING, the other using STUFF. You may have to play around with the data lengths. You can also use strings instead of binary for...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
August 2, 2017 at 2:17 pm
Since John Doe wants active and inactive cards, I've built on J Livingston SQL's reply:
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 31, 2017 at 8:22 am
This will happen if the ORDER BY clause in your OVER() clause is non-deterministic. That is, you have two or more rows that have the same value for the partition/order...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 25, 2017 at 1:18 pm
Reported as spam.
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 25, 2017 at 1:06 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 25, 2017 at 12:59 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 24, 2017 at 9:44 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 21, 2017 at 9:12 am
You were asked to supply the sample data as INSERT statements, not as a spreadsheet. Many people hesitate to open files from the Internet, because of the potential for harmful...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 21, 2017 at 9:11 am
You've been around long enough to know how to post sample data and expected results. Also, one row isn't sufficient. Adding even one more row to the data creates an...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 19, 2017 at 1:51 pm
This uses a windowed function with a frame of 5 rows (2 preceding and 2 following [plus the current row]) and evaluates to "true" (1) if any record in...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 19, 2017 at 1:11 pm
You can fix this by changing the ORDER BY in your FIRST_VALUE calculation.
Your first order field should be whether there is a name or not, and then by the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 18, 2017 at 2:59 pm
SQL Server does not guarantee an order unless you specify an order. Which field(s) are you using to specify your order?
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
July 18, 2017 at 2:05 pm
Viewing 15 posts - 1,666 through 1,680 (of 4,086 total)