> You'll wish you had used a single database: - When you discover a bug that affects all 1000 clients and deploying the fix to 1000 databases is hard.
> You'll be relieved you used multiple databases: - When you discover a bug after deployment to a single customer db and you realize that the rest 999 are happily unware
@ypercubeᵀᴹ Everyone has a test environment. Some people are lucky enough to have a completely separate environment to pre-test in before they do the real testing.
I don't remember the quote exactly. I think I heard it here first.
Duck typing is so much better when you honestly learn it and adopt it, and don't just bitch about it (which is what most people I hear bemoaning ecma are frustrated about, they never bothered to learn it)
Then again, I cut my teeth on C, and I know how nice dynamic objects can be
Most people only ever learned to work in a very tightly controlled JIT RT
@jcolebrand I just took my son to the dentist to treat a big infection and abscess above his front teeth, complications of an accident 2 years ago where one of his front teeth was knocked completely out of his head because the people at the house we were visiting forgot to tell him the rules of the playground slide that "everyone knew". And miss work to do it, when there are critical projects in flight that I need to make serious progress on.
@jcolebrand Yes, functions as first class objects. Awesomeness.
And I have to take him a couple of more times. And my wife can't do it because she's still recovering from major surgery.
No one told my son that the middle slide of 3 was reserved for going up, not down, so when he slid down feet first but face down (so he couldn't see ahead) and another child was climbing up, my son took out the other kid's feet and the kid landed directly on my son's head and smashed his face and tooth into the slide.
It is no consolation that they since then have torn out the slides completely.
So, not great Friday. Or week. Or month. Or perhaps even year, due to all the craziness happening lately.
@MaxVernon it is still not clear to me, why does anyone need to know WeekOfYear depending on DATEFIRST? DATEPART(WEEK, AnyDate) should work according customer server settings
I know, but does it matter if I run a query on my server or on your server?, the query should be the same. For example, if you need a report grouped by week , I wont write 7 different queries.
@MaxVernon When I change the starting value to N'2017-12-31T00:00:00' in order to generate a series for 2018, the results show 0s in WeekOfYearStartingSunday.
(Not trying to be picky, I just happened to be interested by the problem)
Another method that uses the EXP(SUM(LOG())) trick and only window functions for the running total (no recursive CTEs or cursors).
Tested at dbfiddle.uk:
WITH
ct AS
( SELECT
ccp, years, quart,
q2 = round(exp(coalesce(
sum(log(sum(gts))) OVER (PARTITION B...
I hadn't answered at SO for a while.
How often does one get a chance to use 6 nested functions?
round(exp(coalesce(sum(log(sum(gts))) OVER (...) , 0)), 2)
Sometimes in SSMS I press F4 accidentally, which brings up the Properties window. How on earth do I close that pane with the keyboard? This window drives me mad.