28,764 reputation
771121
bio website
location United Kingdom
age
visits member for 3 years, 1 month
seen 9 hours ago

Email: stackoverflowmartinsmith@gmail.com


Sep
9
awarded  Nice Answer
Sep
8
comment A lot of data in the table is only accessed for 4 days or so, how to handle it afterwards?
What RDBMS are you using?
Sep
8
revised Iterate through all non-system databases and empty them
Took a guess at what follows "em"
Sep
8
revised Sql Server - Select while insert on another transaction gives unexpected results
added 289 characters in body
Sep
8
comment Sql Server - Select while insert on another transaction gives unexpected results
@Shanky Fair enough. Would be surprised if sys.fn_PhysLocCracker(%%physloc%%) and %%LOCKRES%% cause any issues but trace flag 1200 may well do.
Sep
8
comment INSERT takes over 5 hours, when inserting more than specific number of rows
What is the source for the insert?
Sep
7
awarded  sql-server
Sep
6
revised Sql Server - Select while insert on another transaction gives unexpected results
added 1039 characters in body
Sep
6
answered Sql Server - Select while insert on another transaction gives unexpected results
Sep
6
comment How to count the rows from 1 table but from two different column
@DChauhan Don't forget to accept an answer if your question is answered.
Sep
6
comment Remove a character from a records enclosed between double quotes
Why does your table have data like this? Why aren't you splitting this data out into columns at import time? e.g. With SSIS or open query and the text file driver.
Sep
3
awarded  Nice Answer
Aug
27
comment Why does my query end up with two seeks instead of one and how do I fix that?
Can you upload the plan or at least provide SQL that runs and reproduces the issue? Current SQL is invalid/
Aug
26
awarded  Necromancer
Aug
18
awarded  Good Answer
Aug
14
comment Why is it @@SERVERNAME but not @@DBNAME?
The @@ ones used to be known as global variables and that syntax goes back to Sybase days. Same with @@IDENTITY vs SCOPE_IDENTITY
Aug
9
comment Script that alters all stored procedure on the database
You'd probably be better off using SMO for this. That easily differentiates the proc header from the body for example. You could even use TSQL100Parser.
Aug
6
comment Is there a way to grant a user access to only all non system views of database?
+1 To me the good thing about this solution over mine is that there is no need to assign permissions explicitly when new views are created.
Aug
1
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.
Jul
31
awarded  Enlightened