Reputation
2,035
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
7 21
Newest
 Yearling
Impact
~97k people reached

Apr
29
comment String that contains letters representing a negative number
@oharkins: This answer doesn't create anything. The @x thing is a table variable. As far as the T-SQL language is concerned, it is declared, not created. Besides, it is there as a substitute for your table. Your actual query should use your real table.
Apr
29
comment How to format SSIS Expression for weekend
Did you mean to use this "answer" to accompany your comment on @billinkc's answer? This is just confusing (at least with no explanation). Anyway, when posting code in a comment, you can enclose it in backticks (`), and it would look like this: LEFT( REPLACE( (DT_STR, 20, 1252)(DATEADD( "D", (DT_I1)DATEPART("weekday",@[System::StartTime]) ==2 ? -3 : -1, @[System::StartTime])),"-","") ,8) + ".xlsx". Not as nice, but not too ugly either. The niceness of its alignment wouldn't matter in a comment anyway.
Apr
29
revised Difference between Hash, Merge and Loop join?
inproved formatting
Apr
29
suggested approved edit on Difference between Hash, Merge and Loop join?
Apr
29
comment Is there any tangible difference between a unique clustered index and a clustered primary key?
@JamesRyan: That's covered by Jon of All Trades's reason #A.
Apr
24
answered Half of a transaction completes, when the other half fails?
Apr
22
revised need to find instances which have multiple rows with the same userID and ResourceID and have a location of 1 and also have other locations
formatting
Apr
22
suggested approved edit on need to find instances which have multiple rows with the same userID and ResourceID and have a location of 1 and also have other locations
Apr
21
comment The cost of left out join versus a select
My understanding is the OP can't control the join type because that is something that Ebean (a framework of some kind? I don't know) generates based on an instruction like return aInstance.bInstances. Nevertheless, I don't think there's a much clearer answer to give at this point. They never elaborated on what exactly the generated left join query looks like.
Apr
20
comment how to revoke backup and restore permission from database owner
Why would you modify privileges of the built-in database owner role rather than creating a custom role without the backup or restore permission and moving your users to it?
Apr
14
revised Left outer join not returning all rows in a grouping query
fixed terminology (the problem is clearly about rows, not columns); added some formatting
Apr
14
suggested approved edit on Left outer join not returning all rows in a grouping query
Mar
31
comment How is the B-Tree created for a composite PK?
When I query this, only PersonID was sorted physically and PersonAge was left out (not sorted) – what specifically do you do when you are trying to determine that?
Mar
25
revised mysql need help optimizing query
minor grammar and formatting improvement
Mar
25
suggested approved edit on mysql need help optimizing query
Mar
24
comment How to query readonly replica in Always On cluster
I wasn't sure I'd manage a coherent answer. Thanks for coming back and sharing what you actually did.
Mar
24
comment How to query readonly replica in Always On cluster
@retif: Could you afford a duplicate linked server item CLUSTERname2 configured the same way as CLUSTERname but additionally having ApplicationIntent=ReadOnly in its connection string (and use CLUSTERname2 in SELECT-only queries, of course)?
Mar
24
comment SQL query for next occurrence of specific date
You could also complicate it even further to get rid of the subselect (no idea if that would be of any benefit).
Mar
18
comment use parameters in a Cte
As for the Connect item, I think it's about a different issue. It's about using functions when calling a stored procedure, and the OP wants to use functions in a specific place of a declaration.
Mar
18
comment use parameters in a Cte
And BoL is again not precise: The default value must be a constant or it can be NULL. Nothing about letting you reference any of the already parsed parameters.