@JackDouglas On a side note: we got rid of that horrible ora-600 by migrating to 12c. No further errors so far. On 11g the errors started occuring at weekly intervals.
@hot2use SQL Server people may well be the majority here but e.g. @dezso isn't your typical SQL Server expert if you look into his Top Tags. And @JackDouglas, even though he needed to learn some SQL Server for his dbfiddle project, is more of a Postgres and Oracle guy if I remember correctly.
I don't remember either of them behaving like Evan
From the beginning his bragging didn't come across for me as mere banter and joking. Although lately I started trying to look at it this way, I'm still not convinced it's all there is to it
More specifically, the one important thing that is hard to shake off as coming from his boasting is disrespect, pure and simple. I'm fine with absence of respect, it's something that needs to be deserved. But I don't think I've done anything to deserve the opposite of respect either.
@hot2use Fair point. I would also like to add that Evan's done a great job providing answers to a lot of PostgreSQL questions, and I don't want this to sound patronising, I actually respect that, even if grudgingly. But it is grudgingly, because if I hadn't come to like PostgreSQL before I met Evan online, it's quite likely I would by now have hated it.
Since SQL Server Management Studio (SSMS) 17, I notice that the query toolbar is black, boring color. I really miss the previous SSMS for SQL Server 2008 R2. This illustrate how it is now, most buttons are just black, hard to tell instantly which one is for what :
And this is what I miss in 20...
Since SQL Server Management Studio (SSMS) 17, I notice that the query toolbar is black, boring color. I really miss the previous SSMS for SQL Server 2008 R2.
This illustrate how it is now, most buttons are just black, hard to tell instantly which one is for what :
And this is what I miss in 20...
@Taryn I can actually relate a little bit. I spent a good deal of yesterday installing SQL Server 2008 R2 - 2017 inclusive and patching them up to current.
@MaxVernon Works for me. I did everything as you describe, got the 100, which, as can be clearly seen, is not an aggregation of the query but an aggregation made by the server, so it clearly recognises it as the same query (as it was just one plan handle for it). Very illustrative.
He simply wants to update with SELECT * FROM ( SELECT id, row_number() OVER (ORDER BY id) FROM dummy ) AS t1(id, rn) JOIN ( SELECT seq, row_number() OVER (ORDER BY seq) FROM dummy ) AS t2(seq, rn) USING (rn); — Evan Carroll3 mins ago
I'm no pro on Oracle, but yo need something like this.
SELECT *
FROM ( SELECT id, row_number() OVER (ORDER BY id) FROM dummy )
AS t1(id, rn)
JOIN ( SELECT seq, row_number() OVER (ORDER BY seq) FROM dummy )
AS t2(seq, rn)
USING (rn);
We look at the two columns id and seq
For id we sort by...
UPDATE dummy d2 SET d2.seq = ( SELECT d1.seq FROM the_query_i_pasted AS d1 WHERE d2.id = d1.id ) WHERE d2.id IN ( SELECT d1.id FROM the_query_i_pasted AS d1 );
I imagine your mental-query-planner is sufficient to judge that appropriately... How'd I do?
Other than that is should work. Mine worked in dbfiddle, but I wrote it before the question was this clear, and I don't like the question anyway, so I didn't post it.
No hair off my back anyway =) go for it Forest. It just seemed pretty clear to me what he wanted and I wasn't getting the continued dialog or the close
You can insult PostgreSQL all you want, you're just wrong. But if you fuck with brownie Sunday's I will march my armies and lay waste to everything you hold dear.
While doing some research for a question, I realized that RULE is a PostgreSQL extension and not part of the SQL standard.
However there doesn't appear to be a tag for RULES on this site, there are a number on Stack Overflow but rules for example, has the following description:
This tag is v...