« first day (4720 days earlier)      last day (86 days later) » 

12:16 AM
It continues being what it is
May 30 at 17:23, by mustaccio
Writing comprehension being what it is these days...
evidently, it's getting even worse
 
user image
2
Where has @Lamak been
 
11 hours ago, by Lamak
paul has the moves, everyone knows that
 
12:37 AM
Avoiding me clearly
 
Might be a reading comprehension issue
 
 
1 hour later…
1:40 AM
Perhaps no one is committed to reading
 
2:01 AM
uncommitted reads are bad
6
 
2:28 AM
@mustaccio hahaha wow.
I did day 1 of Advent of Code today.
I somehow doubt I'll be able to catch up with the actual days.
 
2:43 AM
@CadeRoux ^
 
 
4 hours later…
7:02 AM
@JoshDarnell Nice, what's your language of choice?
 
7:15 AM
Wordle 901 4/6*

🟨⬛⬛⬛⬛
🟨⬛🟨🟨🟨
🟩🟨⬛🟩🟨
🟩🟩🟩🟩🟩
 
 
2 hours later…
9:39 AM
Is there any drawback of changing a schema_owner in a SQL Server database? Currently the owner is a Windows Account: domain\user. I want to change this to dbo.
 
9:57 AM
You could break ownership chaining (or unintentionally enable it)
 
 
1 hour later…
11:23 AM
@ErikDarling In your post The Art Of The SQL Server Stored Procedure: ANSI/SET Options, what's the point of setting ANSI_NULLS and QUOTED_IDENTIFIER on?
And SET NUMERIC_ROUNDABORT OFF; is missing
And SET IMPLICIT_TRANSACTIONS OFF; appears twice
 
22 hours ago, by Lamak
paul has the moves, everyone knows that
 
I used to have something like
SET ANSI_PADDING, ANSI_WARNINGS, ARITHABORT, CONCAT_NULL_YIELDS_NULL, NOCOUNT, XACT_ABORT ON;
SET NUMERIC_ROUNDABORT, IMPLICIT_TRANSACTIONS OFF;
I suppose there's not much harm in setting ANSI_NULLS and QUOTED_IDENTIFIER as well (aside from a false sense of security), but I can't immediately think how it would be useful. Perhaps there is some edge case?
 
12:03 PM
Oh and SET ROWOUNT 0;
 
12:46 PM
@Zikato C#. You? I remember you doing KQL or something last year, right?
 
1:03 PM
@JoshDarnell I did both KQL and SQL last year, but only the first 5 days or so. I'm not even going to try this year.
 
@Zikato I made it to day 12 last year and couldn't get that one in a reasonable amount of time, so stopped there.
The difficulty of the problems really escalates quickly.
There was some math concept that I didn't quite understand, if I'm remembering correctly.
 
1:35 PM
Was it subtraction
 
@PaulWhite just to get all the ansi pokemon
 
@ErikDarling Except NUMERIC_ROUNDABORT. Anyway, question was, what's the point
 
@PaulWhite thanks will fix
 
Oh I see we are still reading
 
@PaulWhite consistency
 
1:40 PM
But it doesn't do anything?
 
you are correct as always
doesn't someone messing with the database level settings for those change things though?
like, in a bad way
 
I don't think so, but I'm a bit hazy on those details
Like, exactly when the database settings come into play
Wouldn't override the settings stored with the module anyway
 
i run into a lot of vendor databases with non-default ansi settings
 
Though I suppose it might affect what those options were when the module was last updated
 
anyway it's my safety dance
 
1:44 PM
I suppose one could check if the options were as desired and fire off a warning or something
 
consulting sucks etc
 
I don't think I've ever seen code that does that though
People tend to rely on deployment scripts etc. to set things the right way
Years go by, then they find the exceptions
Jul 7 at 14:13, by Hannah Vernon - On Strike
@PaulWhite-OnStrike so, we used SSDT to extract the object definitions directly from SQL Server. When it did that, it also obtained the client settings in effect when each object was created. So, since one developer had QUOTED_IDENTIFIER defaulted to OFF, whatever objects they created were defined like that, and SSDT diligently defined them like that in the project.
Maybe add this code to all your modules:
DECLARE @T table(c1 integer NULL INDEX i WHERE c1 IS NOT NULL);
> Msg 1935, Level 16, State 1
Cannot create index. Object 'table-variable' was created with the following SET options off: 'ANSI_NULLS'.
Msg 1750, Level 16, State 1
Could not create constraint or index. See previous errors.
 
o no table varbles
 
Possibly not the most clear or backward-compatible approach in the world
Perhaps a DDL trigger would be the way to go
 
2:00 PM
did customs stuff clear up?
i see green on the dashboard
 
we all know a green dashboard is good
Also, doesn't customs know that the corruption gets worse the longer they wait?
 
@ErikDarling I haven't received a client code yet, so goodness only knows what's going on
 
it went from "on hold" to "clearance event" at 19:21 local time, thursday
sounds like progress
 
2:18 PM
Indeed
But not all progress is in a forward direction
For example, it might have been moved from current storage to bonded storage or whatever
As soon as I get a client code, I'll let them know and then we should get forward movement
 
2:33 PM
all's i know is that the tracking bar went from yellow to green
i'm optimistic
 
It's also possible they're just going to deliver it and ask for ID at that point
As I say, who knows
 
the government works in mysterious ways
 
2:51 PM
Your papers please
 
1993 AUGUST 8

MINISTRY OF SCHEDULED CELEBRATION
PARADIZNA, ARSTOTZKA

"PAPERS, PLEASE" 10TH ANNIVERSARY

The Ministry of Scheduled Celebration congratulates Arstotzka and the Ministry of Admission for ten successful years of service at Grestin Border Checkpoint. A nation is defined by its borders, and the checkpoint in West Grestin represents an unparalleled success in presenting Arstotzka at its best.

Several ministries have contributed significant resources to effect the celebration of this momentous occasion.
 
@JohnK.N. WOW...
 
I've started it like 3 times, never finished it
but the other game by Lucas Pope - The return of Obra Dinn is a masterpiece
 
3:14 PM
> First, a list of things that are horrible:

Tabs
Leading commas
Best blog post ever written
I wonder if it'll get any """"comments""""
 
Recently posted, now with comments
(Empty comment section)
 
3:43 PM
Perfect comment section
 
4:03 PM
They started coming in after your RT
Why do comments follow you so
 
4:26 PM
What's the thing to safely escape an object identifier in SQL Server, as opposed to just surrounding it in brackets manually?...QUOTENAME()?
 
4:38 PM
Yes
 
@PaulWhite I'll subtract you, buddy.
 
@ErikDarling What does one use when QUOTENAME() fails but manually encasing it with brackets doesn't?
 
That would depend on why quotename failed I suppose
 
Doesn't seem to like the characters being passed in.
 
4:53 PM
You knob
Put an N in front of the single quote
 
Ah.
I don't normally deal in NVARCHARs but I guess that makes sense lol.
 
 
2 hours later…
6:27 PM
Outlook vuln from earlier this year that serves as a reminder to not run outdated software mdsec.co.uk/2023/03/…
No interaction needed aside from having outlook running.
 
Just use outlook from your browser
 
 
2 hours later…
8:32 PM
@JoshDarnell I'm caught up on Advent of Code, but it helps I am in a private leaderboard, so there is some pressure to get the points even though I am not up or fast enough to get points on the global leaderboard.
Using Powershell. I actually solved yesterday's part 2 in Wolfram Alpha, since it could simply be solved analytically.
 
9:04 PM
@ErikDarling 9/11?
@JoshDarnell It was meant to be a lead-in to quoting a recent transcript message but I became distracted by an Erik or a Dolphin or something
yesterday, by Charlieface
As evidenced: https://www.youtube.com/watch?v=EbjtSALr38E
Addition, not subtraction, but you get the idea
Anyway, your response was correct in any event
 
@PaulWhite Haha I missed that video 🤣
 
I was thinking more about ABBA FDs [0] (I agree the name is quite the bon mot)- presumably the usual relational algebra principles (Armstrongs and the secondaries) apply but you could also do something like substitution:

eg if X→Y and Y→X then X→B means Y→B, if C→X then C→Y etc

[0]: https://chat.stackexchange.com/transcript/message/64817882#64817882
oh GCM, it bites me again (not sure why multiline messages break it)
 
No formatting in multi-line messages :(
 
Aye :(
Ghetto Chat Markdown, she is a harsh mistress
how often I forget that
 
9:40 PM
@bertieb i do wish letters would quit spearing one another
@PaulWhite thanks for not forgetting
 
10:19 PM
@ErikDarling Internecine conflicts are an occupational hazard for letters
one last newbie-ish question I'm still trying to wrap my head around- anyone got a good explanation of how WHERE EXISTS works and why it's more differenter to a JOIN?
80
Q: EXISTS vs JOIN and use of EXISTS clause

satyajitBelow is the code sample: CREATE TABLE #titles( title_id varchar(20), title varchar(80) NOT NULL, type char(12) NOT NULL, pub_id char(4) NULL, price money NULL, advance money ...

I can't quite wrap my head around the explanations to the effect of "WHERE EXISTS short-circuits"
to me that sounds like a loop (for, while, take your pick) that break;-s when a test condition is met
 
A semi join tests for existence. Once you've found a match, you don't need to keep looking
exists = semi join
not exists = anti semi join
 
But that raises the question- what is a semi join? ;)
Perhaps a better illustration of my confusion:
105
Q: How do SQL EXISTS statements work?

DanI'm trying to learn SQL and am having a hard time understanding EXISTS statements. I came across this quote about "exists" and don't understand something: Using the exists operator, your subquery can return zero, one, or many rows, and the condition simply checks whether the subquery returned...

SELECT *
  FROM suppliers
 WHERE EXISTS (select *
                 from orders
                where suppliers.supplier_id = orders.supplier_id);
._.
(codefencing too??)
so the subquery finds a match on the WHERE clause
exists does its boolean thing, goes "hey, it's TRUE- there does exists a supplier id that matches on these two"
so why then doesn't the SELECT * FROM suppliers part return the whole suppliers table?
 
It only returns rows from suppliers where there exists a matching row in orders where the supplier_id values match
In database theory, relational algebra is a theory that uses algebraic structures for modeling data, and defining queries on it with a well founded semantics. The theory was introduced by Edgar F. Codd. The main application of relational algebra is to provide a theoretical foundation for relational databases, particularly query languages for such databases, chief among which is SQL. Relational databases store tabular data represented as relations. Queries over relational databases often likewise return tabular data represented as relations. The main purpose of relational algebra is to defi...
 
ah okay, that might start to turn on the lightbulb
lemme just reason that through
hm, that sort of makes sense for that particular example- rather than an unrestricted all/nothing SELECT, it's more of a SELECT with a filtered JOIN
 
a semi join, one might say
 
10:30 PM
lol touché
it just... doesn't look like that, at least to my brain at the moment
 
Well
It's a semi join in a couple of ways
1. You can only project attributes from one table (the outer one)
2. Rows from the outer table appear a maximum of once in the result
In a 'normal' join, you can project attributes from either table and rows may multiply in the presence of duplicate matches on the join predicate
Most dialects of SQL lack a SEMI JOIN keyword, so we have EXISTS and IN syntax instead
 
@PaulWhite Ah now see, it mighta helped if semijoins'd been covered in the tiny bit of relational algebra I've done
that explanation helps, thanks
 
Some people find IN more natural than EXISTS
 
it'll be a while before it reads as naturally as a join, but that's experience/practice
yeah IN I can grok, maybe mistakenly so but it kinda makes sense
 
SELECT *
FROM suppliers
WHERE supplier_id IN
(
    SELECT supplier_id
    FROM orders
);
or without the syntax sugar
SELECT *
FROM suppliers
WHERE supplier_id = ANY
(
    SELECT supplier_id
    FROM orders
);
There are four things to understand.
1. The concept of a semi join
2. The different syntaxes
3. The logical operation
4. Physical implementation
People usually struggle most with the correlated subquery aspect of EXISTS
As one of the links mentioned, the question of 'which row'
 
10:41 PM
For 1., apropos of the wiki explanation; I think by the time I got to that part of Codd's paper it was starting to push out what I already knew (or thought I knew) about relations out my brain- I didn't notice it in there before
 
One never quite knows which combination of words will be effective to communicate a concept
 
but reading both helps
@PaulWhite this is very true
 
A link I like as an introduction to joins in SQL Server is docs.microsoft.com/en-us/archive/blogs/craigfr/…
> A semi-join returns rows from one table that would join with another table without performing a complete join. An anti-semi-join returns rows from one table that would not join with another table; these are the rows that would be NULL extended if we performed an outer join.
So, we could name them WOULD JOIN and WOULD NOT JOIN
3
 
(which is why I got a bit frustrated at a certain commenter -- whose comments have been cleaned up since then -- when reading SO questions, telling someone "go read a textbook" when they've done that and not understood it isn't likely to magically produce understanding on the nth pass)
 
You have to admire their persistence using a strategy that has shown no signs of success thus far
I can understand people getting frustrated answering the same question over and over again
But that usually means the person needs to take a break
Anyway, these things have a way of working themselves out
 
10:47 PM
oh absolutely, especially when they look like homework / entry-level questions
I guess people get to a level where they forget what it's like to not understand $THING
and seeing lots of people seemingly failing to grasp something so simple looks like wilful ignorance
 
Also, there's little general agreement on many of the fundamentals so knowing the version of truth someone is referring to can be important
It's a nuanced situation and not as simple as one person becoming frustrated
 
referring to, ah, the stereotypical reputation of a particular site?
 
Paul is arguably the finest GPT ever invented
 
as opposed to there being little general agreement on the fundamentals of database theory
which would surprise me
 
The latter
Be surprised
 
10:51 PM
but I'm feeling credulous, so if you wanna mislead me, now's a great time to do so
 
But really, it's more about which description and tool set to use when describing and using relational theory
 
ah, I thought it (DB theory) was mostly (all?) maths when you take away the mask
 
Sure, it's set theory at heart but there are varying layers on top
 
nods
 
SELECT
    S.*
FROM suppliers AS S
WHICH WOULD JOIN WITH orders AS O
    ON O.supplier_id = S.supplier_id;
There's probably a product out there where that's valid syntax
 
10:54 PM
SQL, where the 'S' stands for "Sensible SQL"
...perhaps I'll leave the naming to the marketing dept
 
Point being, the answer to many relational theory questions depends sensitively on the flavour of theory you're using. One can write a general answer in all cases, but there's always a risk that won't be the 'right' answer according to the textbook and scheme the asker is following.
 
anyway, cheers for the insights and letting me pick your brain
 
Yep, invoice on the way
 
I'll forward it to accounts :)
 
Great, I hope Collections don't need to become involved
You sound like a prompt payer
Nice database you got there etc.
 
10:57 PM
6 mins ago, by Paul White
Be surprised
apols for the double ping
but I had to get it to point to the correct message :)
but if you do have to repo my databases, be prepared for a bunch of EMPLOYEE, DEPARTMENT, PROJECT...
fair warning
it's an older relation sir, but it checks out etc
cheers again, and good morning
 

« first day (4720 days earlier)      last day (86 days later) »