Viewing 15 posts - 766 through 780 (of 1,193 total)
Ok, I confirmed that the problem is ties throwing off the relationship between the ascending and descending row numbers.
It seems that method is just not safe because of the...
December 1, 2015 at 11:32 am
I know it would return rows. The suspicion is that ties would mess with the relationship between the row number sequences and we would see that no rows had the...
December 1, 2015 at 10:39 am
It's probably due to some funky behavior with the two ROW_NUMBER() functions and ties in the data set (I remember there being some funkiness there).
What's the result of the following...
December 1, 2015 at 10:15 am
That's the same date range covered by the test data, so I'm still not 100% clear. You're seeing correct results when run against the test data, but incorrect results when...
December 1, 2015 at 9:47 am
NineIron (12/1/2015)
Oops. Not all of the YearMonths show up.
Do you mean the result of the median query I posted with that sample data is missing rows for some YearMonths?
I see...
December 1, 2015 at 9:31 am
Your table definition lacked datatypes, and the INSERTs were into TEST, not #TEST, but I cleaned that up to get the following for the test data:
CREATE TABLE #TEST
...
December 1, 2015 at 8:44 am
robert.sterbal 56890 (11/30/2015)
Images:Search:
https://www.google.com/search?q=venn+diagram+left+outer+join
Nice references for a real join type; the actual topic of conversation, the mythical LEFT INNER JOIN, will prove more elusive. 🙂
November 30, 2015 at 1:56 pm
So, it would simultaneously return only matching rows from both inputs, and yet all rows from the left input. Maybe a .gif with the intersection shaded, and the non-intersecting portion...
November 30, 2015 at 1:46 pm
A cross tab query should work well for this sort of thing.
Something like this (using just a subset of the columns in the real table for sample data):
CREATE TABLE #CustomStudent
...
November 30, 2015 at 11:43 am
Lynn Pettis (11/25/2015)
Help, I can't read and don't know how to attach a file... Sorry, some people are finding it easier to push my buttons today.
I can sympathize....
November 25, 2015 at 11:42 am
Well, it's not quite undocumented; they just explicitly disallowed this.
From https://msdn.microsoft.com/en-us/library/ms174979.aspx:
If more than one temporary table is created inside a single stored procedure or batch, they must have different names.
It...
November 24, 2015 at 2:30 pm
GilaMonster (11/24/2015)
Generally, when partitioning on dates, RANGE RIGHT is easier to work with.
+1
Should've thought to mention that 🙂
November 24, 2015 at 12:25 pm
The short answer: The constraint on the swap_in table is not correctly aligned with partition 3.
The long answer:
The constraint allows for a date equal to '2008-02-01' (really '2008-02-01 00:00:00'), while...
November 24, 2015 at 12:20 pm
You've only specified values in the CASE for the conditions where the value is NULL or '0'. You would need to add an ELSE to grab the rest of the...
November 24, 2015 at 11:26 am
Shrink commands executed on the primary will get run on the mirror as well, so you shouldn't have to do anything special for the mirrored DB.
Cheers!
November 23, 2015 at 11:14 am
Viewing 15 posts - 766 through 780 (of 1,193 total)