Viewing 15 posts - 1 through 15 (of 23 total)
@Eirikur That works, of course, but SQL Server won't be able to use any index for that query.
December 18, 2022 at 10:13 pm
@JeffreyWilliams Yes, the query behaves as if one had written the AND condition you mention (see the last part of the original post, where I made the same observation), but...
December 18, 2022 at 10:09 pm
Yes, the query plan makes it clear, so I have to accept it, but the result still feels "wrong" to me because 2 is not in the result set (1,3,NULL)....
December 16, 2022 at 6:41 pm
@jeff: I didn't resolve it, it's just that as I looked into the problem further it turned out (surprise surprise...) the situation was more complicated than what the...
September 26, 2019 at 2:08 pm
Please ignore this question, the problem I'm having goes deeper and I already found a different solution.
I tried to just delete this post but there seems to be no way...
September 25, 2019 at 8:45 pm
June 8, 2017 at 9:40 am
@jeff Moden, Thanks for your extensive answer. I like your suggestions on eliminating the transaction and the session key and using the cte to grab the next record...
June 8, 2017 at 9:08 am
I feel compelled to ask the question: why is it NOT a service...
June 7, 2017 at 9:28 am
June 7, 2017 at 8:10 am
June 7, 2017 at 7:17 am
June 7, 2017 at 7:10 am
Good point, I updated my post so the processing is done on a separate transaction in both cases. That way I think the complexity of the work to be done...
June 6, 2017 at 11:18 am
You can update a CTE directly, so there's no need for the #BadRecords temp table and the MULTIPLES and BAD sub-queries:
WITH CTE AS(
SELECT ContactId, FieldTypeId, FieldVersion, StartDate,
ROW_NUMBER() OVER (PARTITION...
October 17, 2016 at 4:43 am
Cody K (4/1/2014)
I feel like there's quite a large disconnect between the intentions of the author, how the article was read, the comments, and then the author's reply to the...
April 1, 2014 at 6:12 am
I have a conspiracy theory about the so-called "IT skills shortage" : it's just a ploy to get more people into IT in order to increase the pool of job...
March 30, 2014 at 6:26 am
Viewing 15 posts - 1 through 15 (of 23 total)