Viewing 15 posts - 1 through 15 (of 68 total)
Update, I was wrong. neither NOCOUNT ON nor XACT_ABORT ON were causing it. I added SET TRANSACTION ISOLATION LEVEL SERIALIZABLE and WITH (updlock) and that produced no duplicates. Per this article
March 30, 2018 at 1:15 pm
Well, I got it.
SELECT 'Audit Report' AS [Subject],
(
SELECT STUFF((
SELECT ';' + Email
FROM ReportSubscription a
WHERE a.ReportGroup IN ('To')
AND a.Active = 1
FOR...
October 3, 2017 at 1:34 pm
Thank you Jason. I had concocted a long CROSS APPLY method, but this FIRST_VALUE function is awesome. Thank you,
Amy
October 25, 2013 at 12:02 pm
Geoff,
To be perfectly honest, I'm not really sure why you're solution worked, but it did. Wait, I think I got it, but I don't know if I'd ever have...
September 30, 2013 at 7:38 am
The report data is populated from a stored procedure. But in order to populate the drop down list, I set up another dataset from a query.
SELECT DISTINCT cipcode,...
September 27, 2013 at 2:44 pm
Thank you again for helping me find a solution, Chris. I ran your new query against the older one, and the execution plans using the source data are attached. ...
July 2, 2013 at 1:06 pm
Thank you Chris. I've just added another person to the temp table. Person #4 makes $45.00 exactly working at two different jobs. Using ROW_NUMBER, we get one row...
June 13, 2013 at 10:21 am
Chris, You've probably forgotten all about this, but after some other projects finished, I finally got back to this. I ran into a problem I hadn't thought of. There are...
June 12, 2013 at 3:03 pm
Chris, Thank you for this article. I have been trying to figure out a solution to a problem I've had for a while, and could only come up with work...
April 23, 2013 at 11:38 am
I can't believe this. My query went from nearly 10 minutes to 2 seconds. I had this idea that the data had to be summed before joining. The dangers of...
April 8, 2013 at 10:46 am
Ok I was assuming the data was already in two tables that could be indexed. My bad!!!
Oops, I think I misunderstood something. The data are in two separate tables that...
April 8, 2013 at 10:17 am
OK, thank you for the link on ancient ceramic toilets 😛 But anyway, you are asking why don't I just put it in a regular table? Correct? The answer...
April 8, 2013 at 9:58 am
I'm sorry, but I don't know what a bog is (relating to SQL, that is). I googled it, and didn't see anything obvious.
April 8, 2013 at 9:46 am
Alan.B. -- not only did it work, but I learned something completely new. Thank you.
Amy
February 26, 2013 at 10:30 am
Thank you for this solution. I had originally tried to do a recursive cte, but though I'm beginning to understand how they work, I haven't been able to succussfully...
September 25, 2012 at 8:48 am
Viewing 15 posts - 1 through 15 (of 68 total)