29,316 reputation
772123
bio website
location United Kingdom
age
visits member for 3 years, 2 months
seen 10 hours ago

Email: stackoverflowmartinsmith@gmail.com


1d
comment How to fix error Msg 1801, Level 16, State 3, Line 3
You have a create database for a database that already exists presumably.
Dec
19
comment Please help me in resolving the error: The definition of object 'trigger name' has changed since it was compiled
Does the stored procedure or trigger alter the trigger definition or table definition? Can you cut the code down to the minimum possible that exhibits the error and post that?
Dec
18
awarded  Enlightened
Dec
18
awarded  Nice Answer
Dec
17
comment In SQL Server, can I guarantee an order without an explicit ORDER BY clause when an index seek is forced on a table with only a clustered index?
@JeroenMostert - IGNORE_DUP_KEY could do that.
Dec
17
comment In SQL Server, can I guarantee an order without an explicit ORDER BY clause when an index seek is forced on a table with only a clustered index?
Though would be easier if HashSet<T> was available in v2 of the CLR...
Dec
17
comment In SQL Server, can I guarantee an order without an explicit ORDER BY clause when an index seek is forced on a table with only a clustered index?
@JohnnyM - I'm guessing CLR
Dec
15
comment Identical tables, identical columns, identical records, but why different record sizes?
@PavelNefyodov - Probably they are including the column count offset AKA NULL bitmap offset (depends where you are counting from) in that Null_Bitmap as otherwise the fixed overhead would need to be 6.
Dec
15
comment Identical tables, identical columns, identical records, but why different record sizes?
@PavelNefyodov - The easiest way to see that would be to create a table with less than 8 columns but for which the row size would be above the 9 byte minimum. Then you no longer have that unused byte confusing things. Or see Paul Randal's example here where it happens to use a single byte. (Byte 10 in his case)
Dec
14
comment How to join a table with a table valued function?
@ShaulBehr not many competing answerers about on a Sunday!
Dec
14
answered How to join a table with a table valued function?
Dec
14
revised Identical tables, identical columns, identical records, but why different record sizes?
Made point more explicit
Dec
14
revised Is it possible to define a function within a stored procedure?
added 133 characters in body
Dec
14
answered Is it possible to define a function within a stored procedure?
Dec
14
comment Is it possible to define a function within a stored procedure?
(1) Is the datatype of CalcField the same in all cases? (2) Your current queries aren't valid without GROUP BY. Are you grouping by the same thing in all cases?
Dec
12
comment How to get COUNT of a range between 2 columns
So if you need it broken out by day there must be a date part somewhere?
Dec
12
revised Identical tables, identical columns, identical records, but why different record sizes?
added 88 characters in body
Dec
12
revised Identical tables, identical columns, identical records, but why different record sizes?
added 88 characters in body
Dec
12
answered Identical tables, identical columns, identical records, but why different record sizes?
Dec
12
comment How to export an image column to files in SQL Server?
I'd probably knock up a simple SSIS dataflow with an Export Column Transformation