Reputation
5,010
Top tag
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 16 46
Impact
~243k people reached

9h
comment Vendor query yields poor performance
I'd suggest placing your code inside of the question. If that link isn't available then your question is completely unanswerable. And also breaking it down into where you believe the issue is. No one is going to want to debug 700 lines of code.
Apr
17
answered Can't seem to understand why STUFF isn't working
Apr
17
comment Can't seem to understand why STUFF isn't working
Depending on your actual query you could shorten your code to - sqlfiddle.com/#!6/f25dc/4
Apr
17
comment Can't seem to understand why STUFF isn't working
You need a WHERE clause in your STUFF - sqlfiddle.com/#!6/f25dc/2 to tie the outer data to the list.
Apr
10
comment SELECT rows with duplicate values
I'd include in your question you attempts. Right now, this is written as a do my work for me type of question.
Apr
10
comment SELECT rows with duplicate values
Did you try anything to get this result?
Apr
2
awarded  Notable Question
Mar
25
comment Efficient way to transpose large categorical column to one-hot table row
@AaronBertrand They are gonna keep scrolling, scrolling, scrolling
Mar
19
comment Purging Data that has Foreign Keys
If you need to delete massive amounts of data, then you always delete in batches to not overload/lock tables, etc. We have several processes that delete millions of rows a night in 10k-100k row batches. Reference 1, reference 2, reference 3
Mar
19
revised placing conditions in a join query join on vs where
added 68 characters in body
Mar
18
comment Distinct rows by order
Any number of ways could be used to return distinct rows but we'd be guessing. What columns have data that is duplicated? You'll have to break the query down and add each table individually and try to work past the duplicated data.
Mar
10
comment Unknown column in a table
@user61052 That's a different question, ask a new one - dba.stackexchange.com/questions/ask
Mar
10
comment Unknown column in a table
@user61052 You'd add the 3 table using another INNER JOIN and you would join ON the column the tables share - see my edit.
Mar
10
revised Unknown column in a table
added 217 characters in body
Mar
10
comment Unknown column in a table
@user61052 Those are aliases for each table. You don't need to use them, but it saves keystrokes by not having to fully type each table name.
Mar
10
revised Unknown column in a table
added 4 characters in body
Mar
10
answered Unknown column in a table
Mar
10
revised Unknown column in a table
added 273 characters in body; edited title
Mar
4
revised Trying to add a NULLable column to a table with over 90 million rows takes a very long time
deleted 19 characters in body; edited tags
Feb
26
awarded  Popular Question