Jack of all trades in a small development shop.

2d
awarded Yearling
2d
comment Avoiding a redundant query in a join
I think I'm done pasting code to see if it runs without an error. Thanks for your effort, I got some insight from it.
2d
comment Why can't I accept an answer in the first 10 minutes after asking the question?
I think this should have been the answer. Too late now.
2d
revised Avoiding a redundant query in a join
conclusion
2d
comment Avoiding a redundant query in a join
Yeah, actually it just appeared to be working; the UserId values it returns are not always correct, because it's just taking the top of the group.
2d
revised Avoiding a redundant query in a join
Added CustomerId to group by clause
2d
comment Avoiding a redundant query in a join
Fixed, but got the same error regarding CustomerId; I added ", CustomerId" to each after the GROUP clause, and it works. Thanks for the help.
2d
revised Avoiding a redundant query in a join
clarification
2d
awarded Custodian
2d
reviewed Approve suggested edit on Avoiding a redundant query in a join
2d
comment Avoiding a redundant query in a join
Your edit is what I did; that's what throws the error.
2d
comment Avoiding a redundant query in a join
I think I understand this, but it does not define the DocumentId column for MinTable or MaxTable; when I define it, I get an error: Column 'DocumentEvents.DocumentId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. My TSQL is pretty rudimentary, so I will need to look up these points.
2d
comment Avoiding a redundant query in a join
@Serpiton: Microsoft SQL Server 2008 R2.
2d
comment Avoiding a redundant query in a join
@SoulTrain: They are both one-to-many.
2d
asked Avoiding a redundant query in a join
Apr
11
revised How to get the most common value in an Int array? (C#)
added 387 characters in body: Clarity, consistency
Apr
11
revised How to get the most common value in an Int array? (C#)
added 30 characters in body
Apr
11
answered How to get the most common value in an Int array? (C#)
Mar
31
awarded Nice Answer
Mar
22
comment Singleton pattern in web applications
@Aaronaught I had misread Skeet's point about checking that the singleton had been loaded (say, in a tight loop) getting expensive. I realize now that this is irrelevant to the discussion; I apologize for the confusion.
1 2 3 4 5