Viewing 15 posts - 541 through 555 (of 5,843 total)
First, I added some additional rows to cover your stated logic:
INSERT #CustomerRef (CustomerKey,CustomerKeyRef,EffectiveDate) VALUES
(1,101,'11/1/2016'),
(1,101,'11/15/2016'),
(2,201,'11/26/2016'),
(2,201,'11/28/2016'),
(3,301,'11/15/2016'),
(4,401,'11/15/2016'),
--important to prove results
(1,101,'11/2/2016'),
(1,101,'11/5/2016'),
(1,101,'11/20/2016')
Now there are 3 rows > orderdate and 2 < order date for 101....
December 9, 2016 at 9:25 am
Indianrock (12/9/2016)
December 9, 2016 at 8:44 am
The MANY (although not nearly as many as Oracle has) knobs, OPTIONS, HINTS, trace flags, etc. that SQL Server exposes are there for a reason: the optimizer cannot POSSIBLY get...
December 9, 2016 at 7:51 am
I'm sorry, but what you have posted up goes WAY beyond free support on a forum, at least for me. That is a metric butt-ton of ugly operations that could...
December 8, 2016 at 9:41 am
Most of the time when dealing with single-quote string issues (such as dynamic SQL) I love setting quoted_identifier off and then using double-quotes around the string and single-quotes inside. Never...
December 8, 2016 at 8:24 am
Look at the estimated query plans for each and see if the differences tell a story.
Also run sp_whoisactive during the execution and see various things you can see with that.
December 7, 2016 at 8:09 pm
Yes, gaps and cluster-groups with lots of rows can happen, just like with identities. But a TOP operator will limit the rows and make sure you never do so many...
December 7, 2016 at 11:51 am
In reality, the IDs are GUIDs, not sequential IDs. Before anybody goes off on a tangent, I know all the argument against using them. I didn't design the system, I'm...
December 7, 2016 at 10:02 am
A minor point, but if you don't need much precision on the seconds this will save you 4 bytes per row that is processed during the actual CONVERTs:
DECLARE @StartDate datetime...
December 7, 2016 at 8:54 am
CELKO:
Unfortunately you have a TOP () operator. This proprietary and totally nonrelational operation requires a sort, hence the order by clause. Sorts are a killer in a relational system. You...
December 6, 2016 at 7:33 pm
CELKO:
1) Take yous ISO elsewhere. This is a SQL Server specific forum and at least 97.4% of the people here couldn't care less. BTW, I'm being generous giving you 2.6%.
2)...
December 6, 2016 at 7:21 pm
Preethi S Raj (12/6/2016)
1) It...
December 6, 2016 at 8:13 am
mario17 (12/5/2016)
I have big process which log all details into TRACKER table for further review and I noticed that I have <Blocking Tree> report once I try to do...
December 6, 2016 at 8:06 am
Lots of what looks like painstaking and tedious work there Alan. Kudos for that. It does seem that it only processes 16 digit numbers, which as Jeff pointed out is...
December 6, 2016 at 8:05 am
krypto69 (12/5/2016)
1) Who said anything about nightly index rebuild? It sounded to me like you did some massive cleanup process that removed hundreds of GB from your database and you...
December 6, 2016 at 7:43 am
Viewing 15 posts - 541 through 555 (of 5,843 total)