Reputation
32,287
Next tag badge:
978/400 score
79/80 answers
Badges
8 81 137
Newest
 Nice Answer
Impact
~999k people reached

10h
comment What's the difference between “expression <=1.” and “expression <= 1”?
The lack of any 0 after the decimal point and the fact that decimal has higher datatype precedence than int so the constant would be implicitly cast anyway if needed would make me think that it is likely a typing error rather than deliberate.
21h
comment How to filter a column of type DATE THE MAXIMUM RECORD DATE IN OBIEE
Please put more effort into your questions than this. Short on explanation and long on ALL CAPS.
22h
comment Why isn't my query returning the correct results?
So presumably you have no data matching the where clause then.
2d
comment concatenating columns from multiple unrelated 1-row resultsets
Or CROSS JOIN of course but hardly worth a separate answer.
Jun
28
comment order of inserting record is mismatching
You state that "the data is stored physically in the order of the clustered index" - as I commented on the other answer this is not always the case. This is shown visually in my answer here stackoverflow.com/a/24470091/73226
Jun
26
comment Is it better to use an ID (int) or a Name (varchar) as PK for a table?
@Enthusiast - You could still optionally enforce the uniqueness with a unique constraint if you wanted. My point is that it gives you more flexibility. Are you going to tell the business that they can't name a product "bread" because that was the name of a deactivated product 5 years ago?
Jun
26
comment SQL Server Management Studio greyed out
Hmm, found this for 2005 social.msdn.microsoft.com/Forums/sqlserver/en-US/… the path to the Shell folder will be different for 2008 but could well be basically the same fix.
Jun
25
comment Keep connections alive when disconnected from network
Related recent question dba.stackexchange.com/q/104920/3690
Jun
25
comment SQLCMD Mode in SSMS and @@variable expansion
You just substitute the string @@servername for $(dbNotServer) so the SQL sent to execute is SELECT @@servername AS worked. There is no assignment of the value of @@servername to the sqlcmd variable as asked for.
Jun
25
comment order of inserting record is mismatching
@TomV - can be read in that order but SQL Server can also read in allocation order under some circumstances,
Jun
25
comment order of inserting record is mismatching
Clustered indexes aren't necessarily stored ordered in key order on disc. There can be fragmentation where logical and physical order is different.
Jun
24
comment MS-SQL: unique constraint case-insensitive
What is the current column collation? I assume it must be CS? Why don't you want to change it to CI if you are not allowing any values to exist that differ only by case?
Jun
24
comment SQL Server 2008: DoMiniDump () encountered error (0x80004005) - Unspecified error
That is not the most up-to-date build. You could try installing SP4
Jun
23
comment What happens if a client connection is killed while holding a lock?
@usr that's covered in the link I posted above. Defaults look to be the same in 2014 technet.microsoft.com/en-us/library/ms190771(v=sql.120).aspx
Jun
23
comment What happens if a client connection is killed while holding a lock?
@KennethFisher - Found this for 2005 blogs.msdn.com/b/sql_protocols/archive/2006/03/09/546852.aspx
Jun
23
comment What happens if a client connection is killed while holding a lock?
@KennethFisher - But how does it tell? Does it send periodic packets to test? Scanning this article on code project indicates that it may have to codeproject.com/Articles/37490/…
Jun
23
comment What happens if a client connection is killed while holding a lock?
With the SSRS example that's because the report server application itself is making the connection to the database engine. Not the browser itself.
Jun
23
comment Can I simulate a sequence in pre-2012 SQL Server, with separate identity column, in function style?
Second solution here any good to you? stackoverflow.com/a/3462957/73226
Jun
23
comment Predicate not resulting in expected scan
So if you use OPTION (QUERYTRACEON 4199) on the original query does the problem disappear?
Jun
23
comment Predicate not resulting in expected scan
In the first query what plan do you get if you try with the results of the expression? i.e. [ImageDate] BETWEEN '2015-04-25' AND '2015-05-30'? There is a cardinality estimation bug with DATEDIFF that may be playing a part?