305 reputation
210
bio website dvt.co.za
location South Africa
age 43
visits member for 2 years, 7 months
seen Jun 27 at 14:32

I've been developing software of all shapes and sizes using Microsoft technologies for over 20 years now.

The wonder of our profession is that we continue to learn something new every day.

Current obsession : Simple Math Fraction Calculators for my kid's school maths (and prime number generation for Project Euler ;-)


Jan
26
comment MySQL and window functions
Have a look at this workaround here and here
Oct
24
comment How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?
@ypercube - indeed, that's what I had feared I had to do in the original fiddle above. I guess I was hoping there was a back door hack to somehow get Sql to switch / influence the way in which it enforced the FK.
Oct
24
awarded  Commentator
Oct
24
comment How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?
Thanks Jon - will generate drop scripts for the UKC and FK's and recreate the FK's.
Oct
24
accepted How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?
Oct
24
comment How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?
Interestingly enough, SQL seems determined to use the UKC ahead of the PK even if the RI is created afterwards, e.g. sqlfiddle.com/#!6/34c52
Oct
24
asked How can I change Referential Integrity from a Unique Key Constraint to a Primary Key?
Jul
24
comment Difference between count(*) and count(1) in mysql?
Thanks Emmad - updated.
Jul
24
revised Difference between count(*) and count(1) in mysql?
Yup, my bad. DISTINCT definitely does evaluate the expression. And noted that for ALL expressions, they are still evaluated for NULL
Jul
23
awarded  Enlightened
Jul
23
awarded  Nice Answer
Jul
12
revised Implications of using a Unique NonClustered Index with Covering Columns instead of a Primary Key
Clarify initial opening paragraph
Jan
4
awarded  Yearling
Oct
8
comment Best table schema to store daily hits for many items?
Option 2 doesn't make much sense given your requirement to determine cumulative hits between any 2 dates. Your first option gives most flexibility.
Aug
24
comment How can place SQL Server online on the internet?
You might consider hosting your SQL database at a service provider - there are a lot of security concerns you need to address and a provider is likely to have more experience.
Aug
17
comment Difference between count(*) and count(1) in mysql?
Yes, is interesting to see how the different RDBMS handle an invalid expression.
Aug
17
answered Difference between count(*) and count(1) in mysql?
Aug
14
awarded  Citizen Patrol
Jul
31
awarded  Editor
Jul
31
revised Implications of using a Unique NonClustered Index with Covering Columns instead of a Primary Key
The index 'redundancy' was spotted after being inspired by Kimberley Tripp's blog article - referenced.