30,596 reputation
877128
bio website
location United Kingdom
age
visits member for 3 years, 6 months
seen 47 mins ago

Email: stackoverflowmartinsmith@gmail.com


Jan
13
awarded  Famous Question
Jan
13
revised meaning of ## in SQL Server Profiler trace data
added 10 characters in body
Jan
12
reviewed Approve Distinct count of 5 different fields based on multiple values?
Jan
12
comment Performance of query with complex where clause on 10M rows
What version of SQL Server are you on?
Jan
11
revised Using DISTINCT in window function with OVER
added 160 characters in body
Jan
11
answered Using DISTINCT in window function with OVER
Jan
11
revised Using DISTINCT in window function with OVER
FIx for if A is nullable
Jan
11
revised Is NOLOCK always bad?
added 439 characters in body
Jan
10
comment How can I make this query sargable?
Thanks. I see it now!
Jan
10
comment How can I make this query sargable?
Ah Ok. I'm sure you're right but I don't see the translation to 0x either though. It just gets translated to the next rowversion column as far as I see. 0x00000000000007D9, 0x00000000000007DA, 0x00000000000007DB
Jan
10
comment How can I make this query sargable?
Regarding the "when not nullable, varbinary(8) otherwise" is it possible to get this to happen? If I try and create a nullable timestamp column and insert an explicit NULL it still doesn't end up as NULL. The column also ends up in the fixed length data part of the row. CREATE TABLE #T (A TIMESTAMP NULL,B INT,C INT);INSERT INTO #T VALUES (NULL,1,1);SELECT * FROM #T;DROP TABLE #T;
Jan
5
awarded  Nice Answer
Jan
4
comment Does SQL Server read all of a COALESCE function even if the first argument is not NULL?
And looks as though there was another issue with CASE that was quietly fixed
Jan
3
comment Writing Conditions in Left join sql
This isn't a "rare scenario". It is a straight forward application of the rules described there.
Jan
3
comment Writing Conditions in Left join sql
Does this help?
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
This inserts a single value to 12 rows. I think they want the other way round (12 values to a single row)
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
next question, why do you need to store all 12 months? Presumably you just need to store one as the others can be calculated by just doing dateadd(month? Also what is this table actually representing anyway?
Jan
2
revised SQL Server 2012 Standard server with 50 instances won't uninstall instances
added 129 characters in body
Jan
2
comment Adding Last 12 Months to a row in a table (SQL Server)
Please give the table definition and example "before" and "after" states.
Jan
2
reviewed Reject At What Point Should I Split or Partition a Very Large but Simple Table