Imagine if English was postfix compiler language. A sentence like "@PaulWhite (being the mod) deleted the comment" becomes "@PaulWhite the mod being () the comment deleted"
Presumably, the visit from the chairman of the 1922 committee earlier indicated to her there were enough of her MPs' votes to pass a motion of no confidence or whatever
@PaulWhite Yes - 6NF breaks some RM requirements (mainly around NULLs) without some additional support on top. I come to see it more as a "physical storage optimization" instead of an actual normal form for that reason.
The QA department opened a ticket with the dev team this week:
> In the [...] window we use 3 contractions (couldn't, haven't, it's) but do not contract "does not". We should either use contractions for all 4 (if the informal is fine for messaging) or use no contractions.
@Charlieface It might be highly unlikely. Many highly unlikely things have occurred in recent times, not all of them appearing to have a solid rational basis
In reality, it's not a big deal, because we're just going to put that in the backlog behind all of the urgent projects we have and it will get done in some sprint in the distant future.
I just thought the timing (both of our teams are really busy) and triviality of it were funny 😀
@ErikDarling Sometimes we do that. The official policy is to put it in the backlog and let it get prioritized with all the other work. But if it's simple, and someone isn't completely underwater with projects and production issues, we'll just make the change.
@JohnK.N. "It's" is the contraction for "it is" - QA was targeting all contractions, it's just a coincidence that the other three were "___ not" contractions 😃
> that type of language is not acceptable on the Stack Exchange network. Please remember that this is supposed to be a professional environment; you can review the Code of Conduct for a refresher on how users are supposed to interact here.
Just to add to Aaron's answer above...
Be aware that an ORDER BY may break by only including the last item in your query. In my case, I was not grouping, so not sure if that makes a difference. I'm using SQL 2014. In my case, I have something like value1, value2, value3... but my result in the v...
TLDR; This is not a documented/supported approach for concatenating strings across rows. It sometimes works but also sometimes fails as it depends what execution plan you get.
Instead use one of the following guaranteed approaches
SQL Server 2017+
SELECT @a = STRING_AGG([msg], '') WITHIN GROUP (O...
Is this a bug in SQL Server?
No.
From PRB: Execution Plan and Results of Aggregate Concatenation Queries Depend Upon Expression Location
The correct behavior for an aggregate concatenation query is
undefined.
See also this excellent answer by Martin Smith over at stackoverflow.
nvar...
/*Starting place*/
SELECT TOP (1)
@NextBatchMax = SQ1.id
FROM
(
SELECT TOP (1000) aia.id
FROM dbo.as_i_am AS aia
WHERE aia.id > @LargestKeyProcessed
ORDER BY aia.id ASC
) AS SQ1
ORDER BY SQ1.id DESC;
@PaulWhite There's a script at the bottom of that with this gem SELECT 'EXECUTE sys.sp_refreshsqlmodule ''[' + OBJECT_SCHEMA_NAME(object_id) + +'].' + '[' + OBJECT_NAME(object_id) + ']'';' AS 'RefreshStatement' hmmm, no use of QUOTENAMEand use of single-quoted column names and use of system functions instead of joining the sys.objects view, all in one line. Not bad.
@PaulWhite I remember when they rolled out their fancy new graph syntax and every example was something that could be done with an inner join or correlated subquery
They escalated my ticket to the engineering team, and just send me an email every few days saying they haven't heard back from engineering yet, and don't have an ETA.
@Charlieface I also frequently encounter issues with aggregates and views, where parameters cannot be pushed in (although they can be, and that's often my key workaround - adding the parameters to an inline table-valued function to get past the aggregator).
@CadeRoux Arguably TVFs are a better version of views in almost every way. There is almost nothing that views can do that they cannot, including being updatable. The only things I can think of are they cannot be indexed (obviously they can still utilize indexed views in their plans) and the rarely used CHECK OPTION.
@Charlieface Single-statement TVFs, true. MSTVFs leave too much trouble for the developer to get into, and prevent parallelization in consuming queries.