@JackDouglas Is it new, the "plain-text" output format on SQLFiddle? I just used it today. I would rather have liked the MySQL version +----+, but that'll do me for now.
so I called out this person for a link only answer and I now I got a mysterious downvote on an old answer
Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. — bluefeet7 mins ago
It wouldn't be responsible of a mod to say "yes that guy downvoted you", but that doesn't mean they couldn't take action against a revenge downvoter if you brought it to their attention
Can't speak for SO, but if someone told me they suspected that behaviour on dba.se I'd look into it
Just ask them... But be aware, some of us consider such comments to border on rude: avoid whining about the down-vote itself, or demanding a response - and do your best to figure it out on your own first... — Shog9Sep 8 '10 at 15:39
I would have thought mods have better things to do than track down the loss of 2 rep... There are many mechanisms in place to flush out [serial] revenge downvoting and other undesirable behaviour. Just IMHO
@RichardTheKiwi You are kidding right? No-one cares about the rep. I do care about community-building though, and revenge downvoting is not exactly community friendly.
But there is nothing in place to catch vengeful downvotes. As I said, the downvote was almost immediately after I questioned the link only pointless answer
@JackDouglas 1/2 (joking) and 1/2 (not). I'd hardly care, if the person was only venting and it was a one-off, even 5-off. Don't start about vote-accuracy of posts... difference between 12 or 3 votes hardly define the worth of a post
Ok so if it was already not looking good, on any given day you could easily attract another one right? The original question already included "full text search", so maybe someone got disappointed hitting the question-answer.
@bluefeet It happened to me last week, I got 6 downvotes immediately after a discussion with a SO user, and some random downvotes on other old answers. I exoected a cleaning of those serial downvotes, but it didn't happened....well, nothing to do
I have two tables -
Table A : 1MM rows,
AsOfDate, Id, BId (foreign key to table B)
Table B : 50k rows,
Id, Flag, ValidFrom, ValidTo
Table A contains multiple records per day between 2011/01/01 and 2011/12/31 across 100 BId's.
Table B contains multiple non overlapping (between validfrom and v...
I dealt with a Manager who kept testing crap on production with public derision and passive aggressive comments...worked out ok. That day, I was a poor diplomat.
Just a friendly reminder: Please don't flag questions that are crap from first day posters, but instead comment and communicate with the user to encourage them to leave better questions.
6
with the answers given on this Q, I think they should be migrated to one site or the other and merged. Thoughts?
I have a table that looks like this:
+----------------------------------------+
|Name | kode | jum |
+----------------------------------------+
| aman |kode1 | 2 |
| aman |kode2 | 1 |
| jhon |kode1 | 4 |
|...
I have MySQL data that looks like this:
+----------------------------------------+
|Name | kode | jum |
+----------------------------------------+
| aman |kode1 | 2 |
| aman |kode2 | 1 |
| jhon |kode1 | 4 ...
I do believe we have the power in this room to effect a move and VtC: Dupe on either side, altho merges would be harder for the SO side, so migrating here would be the better option, im-ever-so-ho
Actually cross posting is legit, but we should be mindful of which site has the more direct experts. If you're just asking SQL language questions, Stack Overflow is often the better choice. But when you wanna understand the internals or the reasons for the SQL, then here is the better choice. Also, once a question has been well-answered on one of the cross-posted sites, the other Q's should be closed or deleted. — jcolebrand9 mins ago
I have MySQL data that looks like this:
+----------------------------------------+
|Name | kode | jum |
+----------------------------------------+
| aman |kode1 | 2 |
| aman |kode2 | 1 |
| jhon |kode1 | 4 ...
I have a table that looks like this:
+----------------------------------------+
|Name | kode | jum |
+----------------------------------------+
| aman |kode1 | 2 |
| aman |kode2 | 1 |
| jhon |kode1 | 4 |
|...
I have a complex nested replace which I am using to join two tables in MSSQL.
select * from A
left outer join
select * from B
on
replace(
replace(
replace(
replace(
replace(A.Column1, '1114', ''),
'1160', ''),
'1162', ''),
...
I tried doing the 60+ hrs/week for a company. They all left at 5 and went home and enjoyed their night. I stopped staying so late, and nobody got upset.
@jcolebrand I'm salaried and when I started getting more responsibilities I negotiated a higher salary that represented the increased responsibilities and probably more hours worked.
@JackDouglas I know, but the cartoon is hilarious. Also, there are plenty of folks here in the states who legitimately don't think women can get pregnant from rape.
Then again, most people don't understand how fertility even works, so ... not that great a loss, sadly.
I did try to reinstate it by visiting the URL but I just received a nice message telling me I had deleted it. Viewing my questions page in my profile didn't display it either :( — Barry11 mins ago
If you still have access to the question URL, and thus its ID, you can undelete it yourself — but it requires a bit of trickery.
Technically, you are allowed to undelete your own questions, you just can't get to the button that allows you to do so. You can just send the undelete request an...
@jcolebrand yes, that's what I meant–but I think I've found the answer. You need 10k to see your own deleted question, though if you could see it you'd be able to undelete it no problem with 1 rep
Generally when things get deleted, it's for a good reason, and we don't want users to be undeleting them -- there's a reason we require 10k rep to "see" deleted items at all, and only moderators can see deletions in a user's profile.
I didn't want to leave this comment on the question because it would sound a bit too snarky but: Barry's a Webapps mod. I'm pretty sure if he coulda undeleted his question, he woulda. :D
(I can at least try to make it sound more offhand in chat than on the question)
@JackDouglas That said, in my limited experience: most users cannot undelete their own content. it's status-bydesign afaik.
I forget why we didn't apply it :)
Seriously though, we haven't seen widespread delete/undelete wars. Before adding additional rules/complexity, we like to see how the community uses a feature.
If it ain't broke, don't fix it!
Mysql - i want to reorder a 100k row database every hour. I have a field called 'order' that i sort by. how can i best reorder it?
I currently do this (pseudo):
mainpage.php : select * from table order by `order` desc limit 100;
and hourly:
cronjob.php : select * from table order by rand();...
@Zane MySQL has it's uses, but the only free option for a migration from the major RDBMSs is postgres–unless you are just using SQL Server as a bit-bucket anyway?
To keep in mind the scale we provide....Scratch that I provide National web based reporting for Wendy's across the country. I am not going to be able to do that on mySQL
@Zane document your concerns well. put it in your HR file on the way out (when you get something else) and keep a copy for yourself so that you don't get blackballed.
@Zane when it goes to crap, you dont want the subtle undercurrents of a) not a team player, b) resistant to change, c) set in his ways, d) this project failed to influence your marketability
@ypercube getting there is the hard part ... if internet is monitored, i'm sure "CAREERS" will show up in big bright flashing letters to the MGMT on the report
It should look like this:
select
PR.ProfileName,
max(Created)
from Photos P
join Profiles PR
on PR.ID= P.ProfileID
Group By PR.ID --or Group By PR.ProfileName
Why wouldn't you write it like that to begin with?
@ypercube it lost me here ... "From Wonder Woman to Xena, Lara Croft to Buffy the Vampire Slayer, many female icons have that killing combination of ruthlessness and sexiness that both men and women admire—and desire."
Seriously, he's complaining about people writing shitty code. We all complain about that. If you can't write a performant query that's on you, not the language.
I have two tables. Table 1 has about 80 rows and Table 2 has about 10 million.
I would like to update all the rows in Table 2 with a random row from Table 1. I don't want the same row for all the rows. Is it possible to update Table 2 and have it randomly select a value for each row it is updat...
@ypercube Good to know. On reflection it doesn't surprise me that PG does (it seems way ahead of T-SQL in adopting newer standard SQL stuff). That MySQL does it funkily is perhaps not that stunning a surprise either.
2
I have some sympathy for his being MAX(created) idea - isn't that just FIRST_VALUE or something?
@Lamak Haven't tried the query myself (can't be bothered to write the test) but the plan shape affects when/how many times NEWID() is called. That WHERE clause rejects NULLs which might or might not affect something.
@SQLkiwi: Is this why this query by RichardTheKiwi gives different execution plan (and number of different GUIDs) depending on the size of the cte? stackoverflow.com/questions/13070418/…
My comment was not exact either. With 40 rows, the CTEs got resolved twice (and 40 + 40 GUIDs produced) while with 3, the CTEs were not resolved at all (and there were 2x3x3 = 18 different GUIDs).
with cte(guid,other) as ( select newid(),1 union all select newid(),2 union all select newid(),3) select a.guid, a.other, b.guid guidb, b.other otherb from cte a cross join cte b order by a.other, b.other OPTION (QUERYTRACEON 8691);
I wonder what is meant by CTEs being 'resolved'? Like everything else in query language, they are part of a logical specification for a query, there's nothing physical about them. CTE = in-line view, nothing more. Can be optimized and transformed just like views too.
@SQLkiwi good stuff. "For my part, I would like to see the internal language of the query processor exposed as an alternative to TSQL" I'm glad you are not holding your breath ;-)
It just seems ridiculous that I can write my own execution plan in SSIS (with graphical tools!), but in T-SQL I have to fight the optimizer to get the plan shape I know I want. Do not get me fully started on this ;c)
@jcolebrand Well we just got the official word that we will be doing the MS SQL 2008 Enterprise to MySQL Community transition 6 Months from now. The other DBA here is going to take a job working for target.
but didn't he express real concerns about it, which he gives as a reason for being left out of the meeting...which implies to me it was discussed before the meeting
@swasheck no basically I just tried to explain that our dev lab has tons of experience with MS SQL server and none with mysql. Not to mention the time it will take to port over a Large Scale Datawarehouse to mysql
@swasheck and yes we do need enterprise. For many reasons the most important of which is partitioning and the increased RAM cap.