27,192 reputation
661114
bio website
location United Kingdom
age
visits member for 2 years, 10 months
seen 9 hours ago

Email: stackoverflowmartinsmith@gmail.com


17h
comment Performance Hit using CAST() in TSQL (SQL Server)?
cast as date can do an index seek but still has problems compared with expressing as a range seek without a cast.
1d
awarded  Enlightened
1d
awarded  Nice Answer
1d
comment Does READ UNCOMMITTED have the same effect as AUTOCOMMIT=1?
Your starting assumption is wrong. Just because transaction T1 runs at read uncommitted doesn't mean that other transactions will see uncommitted changes from T1. It just means T1 sees uncommitted transactions from them...
1d
awarded  Nice Answer
2d
comment How to display money in 12 Lc or 2 Cr
Er, this seems a highly literal interpretation of the spec! I greatly doubt their database can only ever contain those two exact numbers!
2d
comment How to display money in 12 Lc or 2 Cr
How should the number 12,345,678 be displayed? What about the number 42?
2d
comment How to display money in 12 Lc or 2 Cr
@AndriyM Lakh and Crore I believe.
Jul
29
comment What happens during “big” inserts on a table with a clustered composite key?
RE: Will SQL "move" the existing rows to maintain the clustering. No. It will get fragmented and you would need to reorganize/rebuild the index to regain it. Demo of that here
Jul
28
comment Change rowguidcol property to a different column
@wBob - Of course! That makes sense. Unfortunately my hasty DV is locked in unless this answer is edited. But it could do with editing anyway to acknowledge the existence of ALTER TABLE MyTable ALTER COLUMN Col1 DROP ROWGUIDCOL; ALTER TABLE MyTable ALTER COLUMN Col2 ADD ROWGUIDCOL;
Jul
28
comment Change rowguidcol property to a different column
This isn't the case. The ROWGUIDCOL can be removed from/added to columns.
Jul
25
answered Get complete value of varchar(max) field - SQL Server 2005
Jul
24
comment How do I place leading zeros for numbers less than 10 without affecting those 10+?
@user44339 SQL Server doesn't have any such function.
Jul
23
answered Why is my select statement so slow?
Jul
23
comment Why is my select statement so slow?
What does SET STATISTICS IO ON;SET STATISTICS TIME ON; then running the query and waiting for it to finish show?
Jul
23
comment Why is my select statement so slow?
Whilst the query is running can you look in sys.dm_os_waiting_tasks to see if it is blocked?
Jul
22
awarded  Enlightened
Jul
22
awarded  Nice Answer
Jul
21
comment Finding last time table was updated?
@SeanPerkins - See edited version
Jul
21
revised Finding last time table was updated?
added 105 characters in body