« first day (4181 days earlier)      last day (985 days later) » 

01:48
I wish they would just unify Code and ADS. I have ADS, but because I am often working in Powershell/XML/JS/etc and we do a lot of code generation and I have a whole build and release process, I just use Code or Visual Studio because that's what I always used for those bits.
 
4 hours later…
05:30
A chairde - Morning all!
 
4 hours later…
09:12
Morning
 
3 hours later…
12:21
0
A: Extract a substring where the delimiter might appear more than once

Paul WhiteDo it backwards: search the substring until the hyphen from the end of the string (using the SUBSTRING_INDEX function) then TRIM the found part from the value. If the delimiter is strictly those as shown (- hyphen with space before and after) then use this as the three-character delimiter. - Akin...

@Vérace FYI ^
12:41
Morning
12:51
@PaulWhite i didn't know you also had mysql authority
@ErikDarling Strictly mariadb
It's kinda embarrassing how backward T-SQL is
"kinda"
*awfully
Anyway it's obviously Akina's answer, I just fleshed it out with an example.
It was surprisingly easy, and the documentation is quite good.
I was tripped up by mariadb not using + or || for string concatenation.
I liked your comment about how long it took STRING_SPLIT to get the ordinal btw.
well i would miss typing reverse reverse substring charindex charindex len len blah blah boo hoo
good ol' t-sql
yeah really would miss that heaps
12:57
@PaulWhite i'm glad you're back to following the most important sql server blog on the internet
I had missed a bunch of quality material it seems so more fool me I guess
the highest quality
That HP and insert performance from GS needs fixing
Not that, as you say, Microsoft will understand why anyone would generate 1M rows
I wonder how long the intern has left
was my assessment of round robin v. demand partitioning there anywhere close to reality
it was in the right general area of the map
not a short walk, but not a train ride either
13:04
if there's anything to add that would make it more correct i am open
round robin still assembles rows into packets before push transfer, but demand literally pulls a row at a time
I'd need to do some analysis to work out exactly why your demo is as slow as it is. I suspect a lack of bulk operations, or insufficient buffering, but that's just guessing. Equally likely something just isn't hooked up right internally at this stage.
I generally don't worry much about perf in CTPs.
Mostly because it's so low reward. P much every time I've pointed out perf issues in past pre-release builds, I just ended up wasting some dev's time explaining how they were aware and providing some details about an enhancement that already existed in the code base, but not public yet. Not hugely constructive use of anyone's time.
i've heard that code was copy and pasted from another microsoft product
Like what?
I mean you might be right, but I haven't heard that
Perhaps they CTRL-C CTRL-V from Stack Overflow like all good devs
i'll give you a hint
it's both a database and a web browser
A table hint?
13:10
(the name)
Access?
Nah ok Edge
But sure, it's a common code base
i guess it could have been SSMS too
wild huh
Also, somewhat related, how exciting is Ledger
Yeah I suppose (part of) SSMS is now technically retired
@PaulWhite are you playing the joker
🤡
hm links to your website doesn't expand to a card on Twitter. Time for better web devs.
13:21
i'm on my third set
Probably doesn't help your site doesn't appear to be visible to Twitter rn
> ERROR: Failed to fetch page due to: HttpConnectionTimeout
what the hell
not sure if you got to it yet, but no surprise here: erikdarlingdata.com/sql-server/…
yeah I saw that
as you say, not surprising
i wonder why this stuff keeps falling into the same traps
prob EF's fault
@PaulWhite you are right, not at the default settings. || can be used if the sql_mode is set appropriately.
@ypercubeᵀᴹ yep saw that in the docs
Otherwise, the default || is a synonym of OR
Honestly I don't mind the CONCAT. Using + or || always seemed odd to me.
Whatever the SQL Standard might say.
@PaulWhite i've been assured that this is the best economy america has ever seen and we just don't know it
13:56
@PaulWhite yeah, agree
@ErikDarling Yes I think I heard Uncle Joe say something like that
it even has the nice concat_ws() function, where you can choose a separator add between itmes
Indeed
14:23
Thanks for stealing my thunder! :-) Yeah, I meant to get round to the SUBSTRING_INDEX today, but difficulties (Mum is in hospital and there are issues) - but you got it wrong - slightly! The OP's data begins with a "<" also - TRIM(LEADING '<' FROM SUBSTRING_INDEX(field, '> - <')) (or something along those lines - can't test - starving, going to make myself lunch - haven't eaten since 05:30... - now 15:30) does it nicely and is a bit more elegant, n'est-ce pas?
@Vérace-СлаваУкраїні Yeah I don't the < and > are part of the data, that's just how the question was framed.
People often use < and > to indicate a logical term
I took it as a literal - question as asked!
Sure, it is a possible interpretation, just not mine.
The example I added is also just an example.
Some people find code easier to understand than the written description.
It's just what Akina said, but now also expressed in code.
So no thunder was misappropriated IMO.
Sure - many questions here are open to interpretation. Plus, if you read the spec, you can have all sorts of weird and wonderful stuff in an email - just that no sane person would do that! Ooops - expecting end-users to input sane values... hmmm... I always put in code in my answers when appropriate.
There's one user (I won't say who) on SO who has many points but just plops a solution down - no explanation, no nothing. Because of the huge number of answers, the shotgun approach works for them - I prefer the "teach a man to fish" approach rather than just "throwing a man a fish". It's often helpful for me also - as the only way that one can be sure that one understands a topic is if one can explain it (reasonably) simply.
Quite so, but this was the opposite case: explanation, but no code example
I do understand that Akina does not write English well
14:38
I hadn't mentioned SUBSTRING_INDEX in my answer (yet) - I was going to - may get around to it!
I replied to you here - and mentioned that on further investigation, I had realised that SUBSTRING_INDEX provided a more elegant solution than the non-regex one that I had given.
Yes I recall
I gave you most of 24h, but people do forget and I enjoyed writing some MariaDB code
You are most welcome to expand your answer of course
I will say that Akina's answer predates yours by a couple of hours, not that it really matters
(it was originally a comment)
I'll modify my answer tonight before I go to bed - as I said, I'm under time pressure at the minute and some things are (gasp of horror from audience...) more important than dba.se! :-)
As you wish
There's no hurry, Database Administrators will still be here next week
Assuming the world hasn't blown itself up by then
15:14
If it has we can all die knowing we made a difference for free
[IX dbo.Users Reputation (DisplayName)]
this is the work of the devil
15:30
@ErikDarling 👿
I've been mostly using that style for years though
When I can be bothered to name indexes at all
Anyway this is all a bit rich coming from someone who names his demo tables fart
in a database named crap
16:27
@ErikDarling Your site is accessible now, but there are no card tags
> INFO: Page fetched successfully
INFO: 8 metatags were found
ERROR: No card found (Card error)
well then
it helped make me angry
so there's that
For sql.kiwi, I added the following to my page theme:
<meta content='summary_large_image' name='twitter:card'/>
to where?
16:36
HTML theme definition HEAD section
So it appears on every page and uses the default image for every post without me doing anything special
Young @JoshDarnell could probably help
Josh: Erik's twitter cards have stopped working
yeah i'm poking around in filezilla and i have no idea
There will usually be a number of other meta tags
i have enough web problems
i am not creating more
Fair enough
I am increasingly convinced no one knows what they're doing in web development
basic concepts like search and navigation seem to have been cast aside in favor of making everything pretty
16:51
Most sites I visit aren't even pretty
I mean they're ok for the most part
But not what you'd call beautiful
Mine included of course, but I invest literally nothing in it
i like your site
i can find what i want on it
it has good information
when i hit the back button it takes me back exactly one page
seems ideal
ha ha I saw your tweet about the back button
also thanks
 
2 hours later…
18:28
@Vérace-СлаваУкраїні is his first name the same as a known gin brand?
 
3 hours later…
21:34
I wish I had content so good that the site wouldn't matter
like Erland Sommarskog
https://www.sommarskog.se/

« first day (4181 days earlier)      last day (985 days later) »