« first day (1662 days earlier)      last day (3198 days later) » 

4:57 AM
@PaulWhite Too much honour, you mean? Yes, it is. :)
But seriously, you are expanding on a point I completely missed.
 
I'll leave it as it is then. Cool.
15
A: Best way to write SQL Query that checks a column for non-NULL value or NULL

Andriy MThis pattern column = @argument OR (@argument IS NULL AND column IS NULL) can be replaced with EXISTS (SELECT column INTERSECT SELECT @argument) This will let you match a NULL with a NULL and will allow the engine to use an index on column efficiently. For an excellent in-depth analysis of ...

 
 
4 hours later…
8:42 AM
G'day
 
goeiemiddag
 
9:24 AM
Morning all
@swasheck You're confusing it with the language people use to describe it.
user image
2
 
 
3 hours later…
12:21 PM
afternoon
can one somehow figure out how accepts suggested edits?
this user adds tags, without (nearly) ever fixing anything else:
oNare, Santo Domingo, Dominican Republic
1.6k 1 2 20
 
I've seen him before :)
he's after rep before anything else
many answers every day, a lot of them 0 score, very late, ...
 
@dezso needs some advice - or flogging
 
Badge hunting perhaps. Not a bad thing where the activity adds value, but I agree his contributions have been highly variable. I blame the reviewers ;)
Actually, quite often the author of the question accepts the edit.
 
that's also true
I gave advice in one of my rejection comments
I can imagine he didn't read it
 
he's a student, probably doesn't have anything to do during vacation
:)
 
@dezso that, and working with a PFE at the moment
 
@TomV Pfizer@NYSE?
 
12:56 PM
kick this back to SO, please
0
Q: postgres could not connect to server: No such file or directory in ubuntu 15.04

Shashank Shandilyawhen I run postgres server I am getting the following error psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"? I am using kubuntu latest version 15.04 and using pos...

you have to start the database in order to connect to it
surprise
and my take on oNare's poor edit: dba.stackexchange.com/posts/107990/revisions
 
@dezso premier field engineer
 
1:11 PM
ah, it is something like a fireman, right?
 
1:21 PM
he's the thing you sometimes need to calm your customer down and give them a cozy feeling that their problem has been escalated to the top
 
but apparently it doesn't calm you down, right?
 
the fact that he calms the customer down allows me to work on the problem at hand
which is solved by now
 
ah
that it sounds a win-win
 
it is
it's a whole different level of quality than their support engineers
so the comment was more "working with a PFE" = "not really a laidback friday"
 
1:42 PM
@TomV I know one, too
same opinion as yours, a brilliant gal
 
2:19 PM
@AaronBertrand I don't understand some of the syntax in your answer dba.stackexchange.com/a/108013/10361
1. Why do you have "column = func(column)" in the select clause?
In PostgreSQL that would return a boolean...
2. Why (and I've seen this elsewhere before) do you have a semicolon before the with?
 
@Colin'tHart the "column = ..." is a way to give an alias in SQL Server
 
@Colin'tHart CTEs have this funny syntax requirement
 
WTF+
That's so silly...
Both requirements, but I was primarily reacting to the "a = expr" syntax
 
"with" keyword has multiple uses (hints, CTEs), this one helps differentiate for the CTE
@Colin'tHart it's Aaron's prefered way of aliasing columns
 
I think it's a braindead design.
You can have two expressions in one query -- one in the select clause and one in the where clause -- having entirely different semantics.
 
2:26 PM
@Colin'tHart WITH requires the previous statement be terminated properly. Putting a semicolon before the WITH guards against that not being the case. Ok I suppose for demo code, not something I would do in production code.
 
@PaulWhite Aha, That makes more sense to me.
 
alias = expr reads nicer to me, you don't have to scan right to the ragged edge to see the exposed column name. By all means use expr AS alias if you prefer. Style thing.
 
Jon
anyone have any recommendations for SQL Server Training? Looking at the Microsoft training offered here: microsoft.com/learning/en-us/sql-training.aspx and wondering about the quality?
 
@Marian It's not a requirement of CTEs really. But it may give syntax errors if the previous statement is not terminated with ; because of the similar WITH NOLOCK hints/syntax
 
@Colin'tHart Yes, exactly as Paul suggests (I even blog about it). I don't write code for PostgreSQL and don't really place portability above all else - I'll use ANSI standard when it isn't more convenient to do otherwise. I blogged about this here:
@PaulWhite I do that even in production, to avoid someone pasting in some query or statement before the CTE and then complaining when it breaks
 
2:34 PM
@ypercube indeed, lazy wording, it's as Paul said, previous statement needs to be terminated correctly with a ;
 
@AaronBertrand Yes, fair enough.
I'm not that nice :)
 
@ypercube And you can never have too many semi-colons. This is valid: SELECT 1;;;;;;;;;;;SELECT 2;;;;SELECT 3;;;;;;;;
 
looking at that makes my : hurt
 
@AaronBertrand I will agree that it is nice to have the column aliases all lined up and visible -- not on the right. But I still don't like having what looks like expressions in the select clause. I take it SQL Server doesn't support booleans in the select clause like PostgreSQL does, where I can do select col1 = col2 as matches from ...
 
@Colin'tHart SQL-Server does not even have a boolean type
 
2:41 PM
@ypercube Oh, poor things!
 
@Colin'tHart As Paul said, it's a style thing, but I have an objective reason for it. That specific concern is not a concern in SQL Server.
 
I really don't understand DBMSes that don't have a boolean type. What are where clauses operating on?
 
@Colin'tHart I'll admit that not all of my conventions are popular, but I do have good, objective reasons for them.
 
@AaronBertrand I agree completely with your arguments for using it.
 
@Colin'tHart SQL Server has a BIT type. And there are ways to use Boolean expressions for filters, joins, etc. You don't need a boolean type to perform boolean logic.
Just like you don't need a JSON type to store JSON.
 
2:43 PM
Especially writing code that is optimised (for want of a better word) for your particular DBMS of choice.
@AaronBertrand Still, it makes it a second class citizen.
 
@Colin'tHart I have been working with SQL Server for almost 20 years, and not once have I thought "Man, I wish we had a boolean type!" never mind "Wow, SQL Server sucks because it doesn't have a boolean type!"
Does PostgreSQL support parallelism yet?
 
No. Not yet.
And it sucks.
 
i hear there is some wirk being done on it
 
Every DBMS has its strengths and weaknesses. I don't think you can get very far suggesting SQL Server is a second class citizen because it doesn't have a boolean type.
 
@AaronBertrand I did think that when working with Oracle.
 
2:46 PM
@AaronBertrand I read it as "booleans are second class citizens in SQL-Server"
 
@AaronBertrand I said that the boolean or whatever you use to emulate it was a second-class citizen.
 
@Colin'tHart ah, sorry, that was ambiguous at best :-)
 
@AaronBertrand Strongly agree with the first sentence: every DBMS has its strengths and weaknesses.
I guess I'm spoiled now being used to PostgreSQL's rich types.
And we're getting parallelism soon :-D
 
@Colin'tHart Yeah, like in a year or 2.
 
Sorry to have to drop off just as the discussion is getting interesting, but it's weekend here. Cheers!
 
3:13 PM
@Colin'tHart postgres relies way to heavily on the OS (see: collation). that's both a strength and a weakness. i love postgres. make money with sql server.
 
@swasheck you mean spend money, right?
 
@dezso i meant to say "i make money with sql server." it's what i do on a daily basis.
 
I see
 
pitting RDBMS' against each other is stupid
 
 
3 hours later…
6:50 PM
<crickets>
 
sleep now in the fire
 
7:23 PM
@swasheck unless one of them is MySQL
just kidding
@Colin'tHart presumably you used char(1) for years when working with Oracle?
 
@JackDouglas it's very kind of you to consider MySQL an RDBMS
 
ha
poor old MySQL
hmmm, this looks a bit suss: db-engines.com/en/ranking
nice we get a plug though "We use the number of related questions and the number of interested users on the well-known IT-related Q&A sites Stack Overflow and DBA Stack Exchange. "
 
> Number of mentions of the system on websites, measured as number of results in search engines queries. At the moment, we use Google and Bing for this measurement. In order to count only relevant results, we are searching for <system name> together with the term database, e.g. "Oracle" and "database".
@JackDouglas sounds like a legit metric ... thhhhhpppppttttt
 
So if more people complain more often about MySQL, that means it's ranked higher?
I agree, what a stupid waste of bytes
 
@AaronBertrand yeah. so level of complexity increases rank. also, level of incompetence increases rank.
 
7:32 PM
Trying to work out their angle. It's produced by a NoSQL consultancy
I'd guess they choose what to measure so MongoDB looks hot
seeing as that's the one climbing up the rankings
 
what happens when you have devs noodling around in production? your sys.dm_db_missing_index_details reads like a comic book
 
db-engines.com/en/ranking_definition - pretty lame. Those rankings are based on popularity - which puts one of the worst (technically) rdbms's out there (MySQL) - whereas a vastly superior one (Firebird) is way down the list. DB.SE does get a mention FWIW.
 
@Vérace I don't get why Oracle is top, it's not exactly trending on Twitter
 
@JackDouglas other "metrics"
it sounds like an extremely complicated opinion poll
which reminds me ... they should read this houstonpress.com/arts/…
 
@swasheck not google search: 17M v 47M
 
7:39 PM
@JackDouglas Could be because some mysql docs and webpages are under oracle.com ?
 
dunno
@swasheck "Everyone knows water expands when it freezes. Do you know why it does that when literally nothing else in the world does? Nope, and neither does science" er, I think that might just be his opinion :p
2
A: Density of Solid States of Compounds

FlorisStart of an answer... hoping someone else will edit / comment / improve. The reason that water expands on freezing is that the crystalline state has a specific orientation of the molecules (through hydrogen bonds) that leaves a lot of space between them. So where most of the time the liquid is a...

"literally nothing else in the world does" except silicon, bismuth, antimony and gallium (and germanium)
 
@JackDouglas yeah. i took issue with that because ... it's wrong. but then he discusses it a bit further down as due to the molecular shape.
@JackDouglas gemanium. isnt that the flower that gertie gave to ET? :)
 
@swasheck you mean where he says "Water expands when it freezes because of the shape of the molecule"?
that's just bonkers
what molecule is he talking about?
I think he might have meant to write "because of the structure of the crystal lattice"
but a crystal ain't a molecule
 
@JackDouglas or something like "because of how the molecular composition of H2O affects is polar charging, thereby forcing the molecules into a crystal lattice such that it occupies more area"
 
I agree with his basic message - just because it's you 'opinion' doesn't stop it being wrong :)
his facts are very shaky though
 
7:50 PM
yeah. thereby proving his own point ;)
very complex trolling on his part
 
@swasheck ha ha yes
the very best trolling is when you don't realise you are doing it
I'm looking at you Mr Trump
 
i think he knows
 
Clinton then?
 
all of them
 
is there no innocence anywhere in politics any more
ah well
 
8:34 PM
@JackDouglas I didn't realise that MySQL was trending either.
 
 
1 hour later…
Kin
9:39 PM
Can someone help with this question (dba.stackexchange.com/questions/108060/…) . I think that its a dupe .. and the maked as dupe already has an answer.
 
@Kin so what's the problem?
 
Kin
OP is arguing that its not a dupe .. but @PaulWhite has provided an explanation that answers the question
 
You want to undo the "mark as duplicate"?
 
Kin
I still feel its a dupe .. just want someone to look at it if its a true dupe ..
 
Yes, it is a dupe
Same problem, same resolution, the source columns have to be exact matches for type/length
 
Kin
9:46 PM
thanks @AaronBertrand .. I wanted to have some agree .. (just dont want to close questions as dupe since I can) .. thanks again !
 
@ypercube sorry, my initial reply was not what I intended to end up with
@ypercube the "issue" is he had to add a space to the first column in order for the data lengths to match, and believes this is caused by something other than a data length issue... — Aaron Bertrand ♦ 3 mins ago
HEY ROLANDO!!!!!!
 
Hey @AaronBertrand
 
Gotta go hit some volleyballs, ciao folks
 
hi Rolando!
 
Hey @ypercube.
Gotta quick question.
Anyone knows a SQL Server DBA looking for a job in NYC ?
 
9:54 PM
@AaronBertrand Yes, thnx, deleted my comment.
 
If you do, send me email. I gotta run.
Have a good weekend, everyone
 
... and Rolando rolls away ...
 
Kin
Have a good weekend all ..
 
 
1 hour later…
11:17 PM
I fail to see the reason for the bounty
0
Q: Can I combine the results from multiple columns into a single column without UNION?

igxI have a table with several columns which I want to SELECT: SELECT his_name , her_name, other_name FROM foo; Bu, I instead I want to combine the results all into a single column. As an example, I can do this with UNION ALL as SELECT her_name AS name FROM foo UNION ALL SELECT his_name AS name...

 
11:58 PM
@ypercube oNare is on a badge mission.
 

« first day (1662 days earlier)      last day (3198 days later) »