Generally, I consider a provocative title to be a good idea if it's backed up by good points in the article body. Or if the goal is to open a discussion, I guess (if the blog has a comment section).
I mean, it would probably be disappointing to click a link only to encounter generic whining, without being able to tell the author how pathetic their click-baiting title was.
I have a problem when I want to delete older backups, I've created with Ola Halengreen scripts.
USE Maintenance
EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory ='/mssql/backup/',
@DirectoryStructure ='${InstanceName}{DirectorySeparator}{DatabaseName}',
@Filename='{Databa...
@George.Palacios At my last place we used that to host the bots. It had its problems but was increasingly good. Last I heard they'd got some investment from somewhere or other so expect continuing improvement.
@ypercubeᵀᴹ was I even making sense here given it's mysql?
You cannot just replace "where" with "having" and expect the query behaviour to be the same. The evaluation order is different and the query might end up being a lot slower. — Tom V6 hours ago
presumably if a mod or high-rep user wanted to perform such a check "Find low-frequency tags that only exist on deleted posts", they'd be limited to the public search endpoint?
i'm guessing there's no aggressive background process for such edge-case cleanup
@George.Palacios Stack Exchange Data Explorer by way of explaining the acronym as-used :)
@ypercubeᵀᴹ I wanted to make clear to him that he shouldn't just suggest it as an alternative without any side effects, but I didn't feel like going into an argument about it
@TomV As I understand, having <condition without using aggregate functions> works the same regardless of the sql_mode state, i.e. as a synonym of where (provided there's no group by, that is)
Yes but I can't figure out why in this the where 1 returns a row and the where 5 doesn't return 2 rows
unless having behaves the same as where when there is no group by, but is allowed to return random crap when you have a group by and use having on a field that isn't part of the grouping
I understand we have to be welcoming and I haven't downvoted his answer but instead tried to guide him into clarifying some of the side effects and prerequisites. Instead he decided to argue there are none but I still disagree
My guess is, having behaves like where as long as there's no group by and no aggregate functions. As long as you include an aggregate function, having becomes a normal having
But I don't know, hence asking him (them)
My guess also doesn't explain the absence of rows in the scenario we've just discussed
The answer should at least have a warning "only use this when not actually aggregating, otherwise no-one can explain what MySQL considers the correct resultset"
The tricky (to figure out) part is that if there is an aggregate (either in HAVING or SELECT), the query acts as if there is a GROUP BY. This is fine and good and expected. But allowing to refer to non-aggregated columns (HAVING b=5) produces this nonsense
And what the answer that Tom linked suggests something else. Using HAVING without no aggregate functions anywhere. That (non-standard) results in HAVING acting like WHERE. But you allowed to refer to SELECT aliases in HAVING.
So, it kind of evaluates in the order: WHERE -> SELECT -> HAVING
My guess is, having behaves like where as long as there's no group by and no aggregate functions. As long as you include an aggregate function, having becomes a normal having
It's good that they fixed this in versions 5.7 and 8.0 (and adding window functions required that fix). I guess we'll need some 20+ more years for all mysql users and devs to get used to it.
The nerdiest thing I did recently was to find a Dalek in an antique shop just around the corner when I was still living in Sunningdale.
The label at the bottom says 'Original 1963 Dalek prop' but I'm reliably informed that it's actually from the Peter Cushing movies of a few years later.
Somebody on a forum knew enough about Daleks to recognise the specific version and post a correction. I was comprehensively out-nerded.
@peacedog No. There has been pressure put on the SE developers to support tabular data in questions but they haven't ever done it, despite having implemented it on other boards.
Several sites have MathJax enabled, so there is obviously some room for site-specific markdown.
Therefore please can we have markdown tables here on dba.se? There is an open feature-request for this on mSO, but whereas it is hardly a key feature for a programming Q&A site, a significant percent...
I have a spreadsheet I'm importing into the database raw. It has records in what is known as the "Lockbox format", used by banks apparently. It looks something like this generically:
Batch1 details
child record
another child record
summary for batch
Header Row for Batch2
I have a fiddle set u...