The sheer audacity of some people. Leaving an answer in a comment and flagging the self-answer as Not An Answer. I don't know what to do with you people some days
What is the "not an answer" flag and what is its purpose?
The "not an answer" flag is a moderator flag that users can raise to notify moderators and privileged users1 that a posted answer does not make an attempt to answer the question, and should be deleted.
When should I use this flag?
Use this...
@HannahVernon heh, 33. Not sure if you'd call that young or not, but I forgot my own age the other day, so I'm starting to feel old.
To be fair, I was only about 11 when I was playing around with QuickBasic.
@PaulWhite Sorry, I do love fluffy bunnies, and kiwis are cute too 😉, but is this really more of an answer than a clarification comment? - dba.stackexchange.com/q/324628/150011
If OP's answer to my question is Yes, then I'd figure a real answer around that would involve a code example on how to use transactions. But I'll delete my comment if you think otherwise.
@J.D. Yes, of course. You're not clarifying the question at all. You're asking if the answer you have in mind would be accepted.
Answers can always be expanded via edits, or deleted if they turn out not to be useful.
Same goes for Rohit's comment.
Also bear in mind you're not just answering the OP. Other people with similar questions may see your answer in future and find it useful. They would no doubt find a code example helpful.
They won't see it if you leave it in a comment.
2
The question of what is a comment versus what is an answer seems to perplex many smart people. The answer to both can be found in the SE FAQ linked just above in the transcript.
What is the "not an answer" flag and what is its purpose?
The "not an answer" flag is a moderator flag that users can raise to notify moderators and privileged users1 that a posted answer does not make an attempt to answer the question, and should be deleted.
When should I use this flag?
Use this...
You can't ordinarily delete from more than one table in a single T-SQL DELETE statement.
It is possible to achieve the same effect using triggers or cascading foreign keys with an ON DELETE CASCADE option, but that's probably not what you need.
If you just want to submit a single batch of text an...
I'm getting a new mattress and a new Samsung S23 Ultra arrives today. So, I'm thinking of setting up the bed, and laying in it all day while I configure my phone.
> We are currently offline for maintenance > Routine maintenance usually takes less than an hour. If this turns into an extended outage, we will post details on the status page.
@Charlieface I know question authors sometimes add answers that aren't answers. I have some practical experience with that on this site. In my estimation, this is not one of those times. You might have a different opinion, or hope for a better/more comprehensive answer. That's fine. Questions often receive more than one answer. Sometimes what solved the author's original query isn't satisfying for everyone
The difference is driven by cluster(s) set up. If I get the value from sys.availability_groups instead of sys.availability_groups_cluster it returns the results as expected.
Context
It's a judgement call of course
In a perfect world, the question would be better and they would have responded to the various comments. That hasn't happened yet so we are where we are, making judgement calls
If it turns out the author was intending to add information to their question, I'll happily convert the answer to an edit.
For the time being, I see it as a partial explanation and a workaround
For what it's worth, my guess is the cluster call is padded with char zero in some cases (not spaces)
People are paranoid about buffer overruns these days