1,366 reputation
28
bio website
location
age
visits member for 1 year, 11 months
seen 6 hours ago

11h
answered Simplest way to edit single entry in XML column?
1d
revised Dynamic Table partitioning on a daily basis
full demo included
1d
comment Dynamic Table partitioning on a daily basis
The relationship between filegroups and files is 1-n, ie one filegroup can have one or many files. The potential issue with this design I suppose is one filegroup having many partition boundaries, I'll try and spin up an example, work it through.
1d
answered Dynamic Table partitioning on a daily basis
2d
answered Can I use attribute name to identify XML element?
2d
answered How to benchmark Microsoft SQL Server
2d
comment Check Constraint with Case Statement
The reason your constraint is succeeding is because of the = 1 at the end of it. You're creating a check that evaluates to "when 1 equals 1, ok, else error". Check constraints evaluate to true or false, right? eg insert ( 1, 2 ) => case when 2 = 1 => false => error. eg insert ( 1, 5 ) => case when 1 = 1 => true => ok. Your check will always prevent the values 2,3,4 going into your column. Review check constraints here: technet.microsoft.com/en-us/library/ms188258(v=sql.105).aspx
2d
answered Check Constraint with Case Statement
2d
comment Why does my query end up with two seeks instead of one and how do I fix that?
Hmm you've tagged it as sql-azure but sql azure tables need clustered indexes. Do you just mean an Azure VM? If so, what version? The execution plan would be really useful.
2d
comment Msg 823, Level 24, State 2 for Clustered Column Store Index in SQL Server 2014
Some duplication with dba.stackexchange.com/questions/72816/…
Aug
22
awarded  Enthusiast
Aug
18
comment SQL Parameter Sniffing Possible Workaround
What edition are you working with? eg Standard, Enterprise. I have an idea this is about more than just parameter sniffing but my answer depends on your edition.
Aug
18
answered How to escape '%' inside varchar @params for RAISERROR funcion in SQL Server 2012
Aug
14
comment What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?
Let us continue this discussion in chat.
Aug
14
comment What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?
But that is my point. This pattern is awkward to extend for comparisons between 1-n years. Yours isn't any easier to extend - you would almost have to use dynamic SQL or have templates for same or multi- year comparisons. Think about writing a proc for this. It's messy.
Aug
14
awarded  Cleanup
Aug
14
comment What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?
Yeah sorry, I see what you mean, but it's just an extra WHERE clause ( 6 versus 5 ) and compares slightly less favourably with my query in my rig. Also, I think my point is, the best option is the normal DATE column, and actually having to use 5 or 6 clauses just to implement a simple Between is, I think, awkward to maintain.
Aug
14
revised What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?
rolled back to a previous revision
Aug
14
comment What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?
Can you post your full proposed WHERE clause please @ypercube?
Aug
14
answered What is the advantage of partition Date field into individual Year(int), Month(int), Day(int), Time(time) columns?