@jcolebrand @AaronBertrand here its what I was saying: You must wait for a question to be closed for 2 days before you can vote for deletion. This restriction is removed for trusted users
so 10k users still can vote to delete, but after a question was closed for 2 days
I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site.
(Note that some questions are automatically deleted after 30 days or 1 year, and the author might be oblivious about what happen...
What I think is by far the most important part of this feature request is notification of deletion done by other users/moderators. Currently, there is no notification at all. This only leads to unnecessary confusion and should be fairly easy to implement.
@FaheemMitha the general rule of thumb is never use "reserved keywords" for attribute names. That can be a problem in (eg) C# where class is a proper keyword, but is also a commonly used attribute name (see CSS where class defines what to apply to an element). Same goes for Date, DateTime, Int, String, Long, you get the idea.
Now, if this is going to be genericized over say 15 entities, then yeah, ind (or even just I) would be better
that's why when we do loops, we write for (int i = 0....
but when it's being used in one location, telling me that I'm looking for the SegmentIndex when I read that code makes it intimately more understandable
I have a stored procedure which inserts two records into a table, the difference between the records is that the time column of the second record is @MinToAdd after the first:
CREATE PROCEDURE CreateEntry
/*Other columns*/
@StartTime time(2),
@EndTime time(2),
@MinutesToAdd small...
Ug, they stored information that's only relevant to a backend processing job as an set of csv pairs in different fields.... so like field1 has text 'X,Y' and field2 has text '123,456' but to do anything with it have have to write the query as ...WHERE (somefield1 = 'X' and somefield2 = '123') OR (somefield1 = 'Y' and somefield2 = '456') . So now we have to parse out the fields to do the queries...ug!
@swasheck why? I'm hoping the answer gets deleted. If all of his ranting bullshit gets rolled back by mods (I'm certainly not going to attempt it), maybe I'll undelete then.
@swasheck it really is a "why didn't you RTFM or try it?" question.
@swasheck all of his griping is because he didn't like my edit or the fact that he made assumptions about dateadd.
@swasheck for 120 rep? Much less headache no longer being involved than being forced to modify my answer to satisfy his changed requirements. I have better things to do.
Am I the only one who thinks his question should be closed? He's already received a solution to the problem, and it is unlikely to help any future visitors with enough brains to try dateadd on their own before posting a question.
@AaronBertrand haha. there're the clueless idiots, and then there are the militant idiots
How to add minutes to to a time data type.
That the proposed solution does not result in a loss of precision.
Issues or concerns to be aware of in the event that the minutes would be to too large to fit in a time variable, or risk of rolling the time variable over. If there are no issues then please state so.
i get no loss of precision (unless i am just misunderstanding)
@AaronBertrand He never really explains even in his revised specs what he wants to do ABOUT the rollover of DATEADD(MINUTE, number, time). The modulo thing without taking into account the time itself has no effect. And I'm not sure what he means about precision.
Well then he posted a massive rant as an edit to his question, going on and on about row vs. record and how my edit was unjustified and how my answer was crap and so and and so on...
So I deleted my answer, Cole locked the question (I think it should be closed), and now there will be a discussion on meta that I guess might have a chance at solving something about this (but I'm having trouble seeing what that might be)
i vote for a private chatroom where we all go in and bully him (one by one so that we don't lose precision). that would make me feel better about myself and my awful transaction log derp earlier
How do I add minutes to a time data type?
This question has spontaneously devolved into an edit war. The author feels slighted. Here is his "closing volley" and then my ruling as a moderator (hey, I'm just cleaning up stuff).
Final notes:
It is my right, as the person who asked the que...
You can replace the values with something like this:
select
case when rownum = 1 then title else null end title,
name,
category_id
from
(
SELECT c.title,
i.name,
i.category_id,
@row:=(case when @prev=title and @precat=category_id
then @row else 0 end) + 1 as ro...
@bluefeet I would add the same order by or the order by i.category_id, rownum in the external query, too. Or leave it as it is, and hope it breaks in their face :)
@AaronBertrand That's fair. I haven't even been on SO much recently. There are some decent DBA-type questions there that do belong here, every once in a while though
Sadly this is another case where, in the future, to avoid similar bullshit, I will be considering the user in addition to the quality when deciding whether to answer a question. I'm not ever going to go through this nonsense with the same person twice.
Handy dandy "favorite user" plug-in to the rescue...
Because my problem is, on multiple occasions, I've answered a question by one of these lunatics that makes me pull my hair out, after knowing better, but I often answer a question quickly before noticing who the author is.
@ThomasStringer if it's a comment, click the timestamp and get the url (so there's like four ways to do that) and then paste the link to the comment here
Does the patient_account_fk nonclustered index not exist on your slow server's database table IB_Charge? Your index scan has an estimated row count of 9.7+ million rows where only about 1000 are required. I believe your eager index spool (a blocking operation) is to blame because of that. Not to mention, even on the other server/database/table (the "fast" one) you have an expensive key lookup that you can solve with a covering index. Long story short, poor indexing is causing your woes. — Thomas Stringer35 mins ago
I have a query (sql below) that is nearly instantaneous on 1 server, but takes 7.5 minutes on another virtually (key point) identical server. The estimated query execution plans have one obvious difference; the plan on the slower performing server contains an "Index Spool (Eager Spool)" where t...
Screenshot
Use /command shortcuts to perform common chat tasks:
See message history inline:
Easily preview replied-to messages:
And much, much more...
About
Legends tell of a prolific Meta Stack Overflow chatter who despised using their mouse above all things. In an effort to keep t...
I'm just about to (re)write a project called "StackChat2" which will be a functionally identical version of this app, but for standalone usage, and written in node.js.
It should be SEChat->SC2 pastable, and work with all the SE URLs like this does, so you can copy out links as you do here. But for the case of coming from there to here I'll have to have SE buy-in (as they will have to write a onebox'er for that.
@ThomasStringer not really, I wrote it with two other SE users in a 48 hour code contest about 2 years ago
But I'm going to redo it now, from the ground up, and start over again.
As I indicated in my question this morning, if you have an official source for "what most industry experts tend to agree" then I would be pleased to have it. — Trisped5 mins ago
He got to keep "record" in his question. So I have no idea what purpose this continued badgering serves.
@JackDouglas apologies for my abrupt departure from the other room. i was just asking legitimate questions and was being met with redirection and non-answers. i felt that my questions were legitimate but apparently they were a "waste of time." between that frustration (and really trying to communicate through this medium), and the nearly insta-chide just was the straw that broke the camel's back. Apologies for my rage-quit.
@AaronBertrand posted a DBA question so that we can get a good smattering of expertise
@Mechanicalsnail Tim Hortons (Canadian equivalent of Starbucks as I understand it) has doughnut holes they call TimBits. Was trying to think of something else very Canadian for Aaron and it was between that and poutine
@swasheck I'm wondering if you should keep row and record in its own question. I think the differences there will present enough discussion that column / field could be its own question.
@AaronBertrand he had a blatantly wrong answer that changed to exactly like mine after I posted
Seems non-deterministic, which may be okay, but I'd probably change the inner ORDER BY to ID and add an ORDER BY to the end... — Aaron Bertrand1 min ago
@Trisped to what end? What is your end game? Maybe you should answer this question with an official Microsoft source that states that it is always a record and should never be called a row: dba.stackexchange.com/questions/31805/… — Aaron Bertrand25 secs ago
@bluefeet If I hadn't seen that silly first attempt of an answer, I'd vote for Presumption of innocence. He may just arrived at the same answer. Are there many ways to write this using window functions?
@jcolebrand that's already been done. Might I remind you that you indirectly invited this discussion. Trisped keeps pushing for official proof that he is wrong. — Aaron Bertrand57 secs ago
@AaronBertrand as an aside, the answer's been accepted :)
@AaronBertrand and it has been provided. He can dispute that we have provided proof, but we have. We even have a standing SE Q to answer the fact. Since it has an official question, there is no compelling reason to have it become a comment debate on meta. — jcolebrand54 secs ago
There was a rather innocuous question about adding dates and times in SQL Server that set off a rather fascinating taxonomic debate.
So how do we differentiate between these related terms and how we use them properly?
Row
Record
@swasheck I found plenty of sources - do you really think that's necessary? I guess so, since we've already had one person try to redefine the best practices.
@swasheck A licensed publication is not official. A licensed publication is allowed to present the authors personal preference and suggestions. — Trisped25 mins ago
@jcolebrand It is really hard to keep up in a fast going comment debate. Do you know what is even harder? Keeping up when the old comments are edited at the same as there are coming in new ones. Sorry if I stirred the pot to make things worse.
At the in between job, I had to basically enter a 32 character alpha numeric value in a font that didn't distinguish between a 1 and an l. I'd have PMs provide hand written lists of charge codes so it was a roll of the dice whether I'd get the right or valid code