« first day (4255 days earlier)      last day (912 days later) » 

01:30
> I wish someone would sweep away the whole thing and give us a proper modern database language

All you need is join the ISO subcommittee responsible for this mess and convince all your colleagues you're right.
https://www.iso.org/committee/45342.html
Oh, and then you'll need to convince all vendors to follow the standard
But after that, you're golden
something something strikes again..
 
4 hours later…
05:46
Morning
05:57
morning
after catching up
Who's Ginger?
06:25
A lost soul who stumbled upon this channel by accident
I think lizards were involved
 
2 hours later…
08:25
ah
 
4 hours later…
12:19
great job catching up 😀
morning
 
1 hour later…
13:38
nope
It's 9:40am where you are young Erik
You're not European any more
"about 600 more numeric (18, 10) NULL columns" 😮 — Paul White ♦ 27 mins ago
I don't often emoji in comments
13:56
@PaulWhite yeah but i don't have to like it
 
2 hours later…
15:57
Seen on the interwebs today . . .
user image
2
 
3 hours later…
18:35
howdy folks
18:48
@ErikDarling - are you around?
i thought you made a blog post about a join syntax like ...

join table_a a
join table_b b
join table_c c
on b.key = c.key


or something like that
also, in looking for that blog post using teh googlez i found ...
https://sims.fandom.com/wiki/Erik_Darling
@swasheck you have 3 join and 1 on. Something is missing
exactly
it was really weird
maybe this?
from a
  join b
  join c
  on b.key = c.key
  on a.key = b.key
yeah. i was missing that on
what's the benefit/use of this pattern?
obfuscation?
18:59
Dupe on the main site
25
Q: What does the position of the ON clause actually mean?

boot4lifeThe normal JOIN ... ON ... syntax is well known. But it is also possible to position the ON clause separately from the JOIN that it corresponds to. This is something that is rarely seen in practice, not found in tutorials and I have not found any web resource that even mentions that this is possi...

seriously though, one use I know is that it allows to rewrite any complicated from clause using only LEFT joins.
@swasheck Useful in left-join/inner-join situations. Eg instead of left join b on b.key1 = a.key1 left join c on c.key2 = b.key2 you can do left join b inner join c on c.key1 = b.key1 on b.key2 = a.key2 which has slightly different semantics: it left joins the result of the b=c inner join back to a
from a
  join b
  join c
  on b.key = c.key
  on a.key = b.key

is basically

from a
  join
      ( b join c on b.key = c.key )
  on a.key = b.key
This is my go-to article
https://sqlperformance.com/2019/06/sql-performance/t-sql-bugs-pitfalls-best-practices-joins#:~:text=the%20WHERE%20clause.-,OUTER%2DINNER%20join%20contradiction,-Our%20fourth%20and
19:06
but parentheses are redundant due to the ternary nature of the join-on.
who's this Ben-Gan fella? /s
@mustaccio Nah, like I said we need to sweep away the whole thing. I would love a real object-oriented database language and design, where I can actually use functions on objects and the database can work that into a query plan. Something like Linq, but not missing half the features (window functions I'm looking at you).
JOOQ looks interesting, but it's still just a transpiler (mistranslation) service, I'd want it baked into the product.
19:37
I'm not sure who "we" is, but isn't it still in the purview of "Data management and interchange"?
@swasheck i am, but i've never written about that syntax
@ErikDarling that's because i misrepresented it
oic
yes just saw the link
his url is worth way more than mine
19:42
agnes crumplebottom, though
20:34
i have earned 10 announcer badges over the last few days
with no upvotes in the same period
20:58
> Share a link to a post later visited by 25 unique IP addresses
Practicing your SEO?
21:17
There should be a badge for getting 10 announcer badges and no upvotes
 
2 hours later…
22:51
I had a big fight with BrOz about whether BEGIN CATCH is necessary at all if you want to ensure transaction rollbacks are handled correctly. brentozar.com/archive/2022/01/…
I maintain that using BEGIN CATCH is the wrong thing to do in the majority of cases. It is only necessary if you intend on logging the error, and to be frank, XEvents does a much better job of that. SET XACT_ABORT ON correctly rolls back in all circumstances, including an Attention and a broken connection. Catching an error just to roll back and rethrow is then completely unnecessary, and in triggers it causes spurious errors.
Also most CATCH blocks are badly written, as they use RAISERROR to re-throw, which means you not only lose the existing error number, you also lose secondary error messages, which are impossible to catch. Instead people should use THROW; to re-throw.
So I say don't ever use BEGIN CATCH unless you want to handle the error, not just rethrow it. Anyone got thoughts on this one? Do you use BEGIN CATCH in bog-standard CRUD? (I'm not talking about complex DBA tasks involving lots of DDL).
12
A: What is the point of TRY CATCH block when XACT_ABORT is turned ON?

CharliefaceYou are right that it is not necessary to catch errors you are not intending on handling. SET XACT_ABORT ON; ensures a rollback in all circumstances (except for a couple of very weird edge cases of uncatchable errors, which Erland Sommarskog says are basically unfixed bugs). Syntax errors from dy...


« first day (4255 days earlier)      last day (912 days later) »