« first day (4305 days earlier)      last day (861 days later) » 

00:10
@MichaelGreen have you actually tried that?
Have u
@ErikDarling or advanced connection settings and add timeout - it works
Oh I've been awarded the "worst answer" badge. What an honour.
2
00:31
@PaulWhite yes. It didn’t throw an error using a wait for command
@Forrest thanks, I’ll take a look at that
Quakes, finely ground.
 
2 hours later…
02:54
Taking time out for a timeout
Nominally, even. Quite a treat, isn't it? Surprising.
Gets one to pause and ponder for a moment about the future outages.
@ErikDarling lol where do you find these?
 
3 hours later…
05:55
Morning
06:38
Morning
06:56
Morning
@user346760 no one said that. There were some jokes relating people loving regex with having certain psych.
We all know how regex will finally destroy you if you use them too much. They's re like the ring, the one ring ;)
08:04
Morning
 
4 hours later…
11:52
@ypercubeᵀᴹ and just as enigmatic
@mustaccio I feel I grant myself that every time I answer a question.
 
1 hour later…
13:10
@PaulWhite getting shady
not slim tho
did you wish marshall a happy birthday yesterday
seems to have slipped off my calendar
crikey, he was 50
13:29
Standing up is just going to get harder from this point on
Asking people his name may become more frequent
lol
 
1 hour later…
14:52
hello 🐩
 
2 hours later…
16:34
woof
Yes, I have arrived.
@CadeRoux Is it common, in your experience, to require cherry picking PRs into specific branches and then using those branches to run builds, instead of using a common main branch (and using the PRs to merge into the main branch from individual branches)?
17:04
@user346760 that type of language is not acceptable on the Stack Exchange network. Please remember that this is supposed to be a professional environment; you can review the Code of Conduct for a refresher on how users are supposed to interact here.
17:19
I think HASH UNION is my favourite hint
I'd apply it to the world if I could
@miracle173 SQL Server has hash union just FYI. It works pretty much as you describe for the hash table build, but separate duplicate removal is necessary on the probe side of the union. That can also be done with a hash aggregate, of course. dbfiddle.uk/Z88KrIGdPaul White ♦ 6 hours ago
@PaulWhite you know the question is tagged with , right?
@ypercubeᵀᴹ Yes indeed
@DavidSpillett I don't think that UNION DISTINCT "essentially" forces a sort. I am pretty sure one can efficiently eliminate duplicates by using a hash table, at least in special situation, e.g. one has a lot of values but most of them are repeating. I don't know if there is a database that does actually use such an algorithm, but that is not relevant here. — miracle173 6 hours ago
David also answers a lot of SQL Server questions (he has the gold badge)
It's a pointless side-discussion of course. It won't be around long.
Random question, does anyone know if the SSMS Results window modifies how it represents VARBINARY results in any way?...or it's displayed exactly how it's actually stored?
17:39
@PaulWhite Right.
Postgres has something similar: stackoverflow.com/questions/17334100/…
17:50
Makes it easier to apply to the world
@J.D. It's a string representation. The binary is stored as bits. Exactly how depends on the storage type. Are you asking because you have something that looks different from what you expected? You're not converting a different type to binary first?
Yea apologies my question was a little ambiguous. To get straight to the point, I've noticed if I copy and paste the string representation of a VARBINARY value from the results window in SSMS, it doesn't act the same as consuming the column directly.
@SeanGallardy Well, we use Team City, and without filtering, it's going to run builds off of every branch (from the repo it's using - which obviously is the GitHub main repo)! What I have to do because our Team City configuration also needs to fork on major versions usually is that a particular set of configurations is tied to a particular main branch - so development or release/7.0SU3 or release/8.0SU2
@PaulWhite To elaborate, for example, when the column holds the bytes of an image, and consuming it in a C# app to display said image, copying the string value from SSMS results in a broken image.
Sounds like you might have an odd number of bytes
17:56
But only when copying from SSMS's results window?... possibly getting truncated in Windows? (Idk if there's a limit to Copy / Paste)
4
Q: SQL Server varbinary column modifying inserted data

OGarveyWe have a table in our database for storing photos, the datatype of the actual photo data is varbinary(max). When inserting a photo from the application, the data is correctly stored and the photo can be viewed as normal. However, I am updating another record to have the same photo and when I u...

> storing files in the database
> mfw
ERP systems FTL 🙃
@JoshDarnell J.D.'s a develOPer you know
17:58
One of the 10 reasons why I like Microsoft's ERP solutions better than the current animal I deal with lol
@PaulWhite So I've heard!
He likes ORMs and regex
lol re: regex I do like the idea of it, but only simple expressions. At a previous job, FinTech, email parsing, all kinds of crazy regex, maybe that's where I lost some of my puzzle pieces. 🧩
So I have a whole set of TeamCity configurations for Development which sticks with the development branch in GitHub. Then that gets copied to a release 10.0 set of configurations which points at release/10.0 branch in GitHub. Which is usually a branch off of development but where it came from really doesn't matter. And the root parameters for the TeamCity configurations sets the DefaultBranch to release/10.0
If someone makes a feature release branch features/nice, that's not going to get built in any of my TeamCity builds. Which is fine. The entire build and testing cycle takes like 4 hours because it runs thousands of what are basically end-to-end system tests, putting data in the OLTP and ensuring that the data warehouse representation is correct.
@J.D. Anyway, yeah there's a limit in SSMS depending on whether you're using Results to Text/Grid.
18:02
I had to learn RegEx once, in a decent amount of detail, in order to pass a Microsoft certification exam. I have forgotten almost everything about it since then.
At least your MSFT certificate has lasting value
So it wasn't all a waste of time and money
All this is for @SeanGallardy - we have a small team and it's basically me for dev, my boss for XSLT and definition, a dashboard/business analyst for SSRS/Tableau/PowerBI/requirements gathering and an informaticist for interfacing with the clinical cardiovascular knowledgebase and domain experts.
Sean religiously reads the complete transcript
@PaulWhite Yeah, exactl- wait a second...
18:05
So we really use GitHub less like a real distributed system and the main repo is more like a traditional TFS/SVN central system that drives the builds - I personally run local builds several times a day, and my boss could if he needed to, but he doesn't and probably would struggle to get his running the first time.
@PaulWhite Yea, I've set the limit to the max for Text results, and I have 2 rows with VARBINARY values. One is much longer than the other. So I have to believe the shorter one isn't truncated. But it's still "broken" only when copied directly out of SSMS.
@JoshDarnell Wasn't it needed for business Partner status or something?
@J.D. Do the obvious debugging. Check the DATALENGTH of the binary string returned and compare it to the limit
@J.D. Oh, you mean the shorter string is broken? How?
Correct. When outputting both rows together.
I think if our product was not so database dependent (each branch needs a matching set of OLTP and analytic databases to run the install and test), we could figure out how to run adhoc installs of every branch pushed to the central repo, but there would be a lot of databases needing to be cleaned up. (The build needs to point at a fully installed prior version, because we have an automated release notes that analyzes key differences in our rules engine)
@J.D. Ok, but how is it broken? Odd number of digits as in the Q & A I linked? Something else?
@ErikDarling Didn't you have some issue with XE binary not prefixing with a zero in some cases, or sthg like that?
18:11
@PaulWhite I've noticed this happen a couple of different ways. But most recently, we have a C# app that renders an image from it. If the app pulls the value from the Table directly by making a data connection to the database and takes it in as a byte array ultimately. If I copy the string directly from SSMS and input it as a byte array in the C# code directly, the image doesn't render.
DOES IT HAVE AN ODD NUMBER OF HEX DIGITS
lol it's not in front of me at the moment, but I'll answer that shortly when I'm back at my desk.
lol fine
Something to verify though, thank you.
I have always have problems with SSMS and large columns (but not dealt with binary much). In fact, I came across one of my very old questions about this from years and years ago just the other day that had newer activity on it.
18:12
Someone on my team is convinced that SQL Server (when stored) or SSMS on read manipulates the binary data. I'm doubtful.
@J.D. Did you say the data was stored an an image data type?
Nah it's VARBINARY(MAX) to be exact.
I don't honestly know if it's relevant, but you could check SET TEXTSIZE to see if it makes a difference
70
Q: SSMS Results to Grid - CRLF not preserved in copy/paste - any better techniques?

Cade RouxWhen I have a result set in the grid like: SELECT 'line 1 line 2 line 3' or SELECT 'line 1' + CHAR(13) + CHAR(10) + 'line 2' + CHAR(13) + CHAR(10) + 'line 3' With embedded CRLF, the display in the grid appears to replace them with spaces (I guess so that they will display all the data). Th...

nvarchar(max), 10 year old question and the behavior has changed since then
I learned regex to do something once. Then I learned regex to do another thing. Now I've got to do something else so I have to learn regex.
18:16
I think I used it once, to see if it liked it
I did not
@PaulWhite Cheers! I should be back at my desk in about 10 minutes. Will verify everything you said. I appreciate it! Regarding your question if it's odd numbered hex digits, is that to determine if it's being padded or not essentially?
@J.D. It's just something odd I remembered from the Q & A
Your binary representation has an odd number of digits. It takes two hex digits to specify a single byte, hence the padding. Are you really trying to store half a byte? That would seem to be an odd (ha!) thing to do. e.g. DECLARE @v varbinary(max) = 0x123; SELECT @v;Paul White ♦ Jun 12, 2015 at 11:08
There will be a rational explanation, in any case
@PaulWhite always is, sometimes it makes you irrational to get there though. Thanks! Cheers!
It'd better not be the leading 0x
18:21
lol nah tried that already. Also I guess if it was padded it would start with 0x0... but it doesn't start with 0x0 (from what I recall) so I guess it's not padded and therefore I'm assuming it's an even number of hex digits.
18:34
FWIW, confirmed even number of hex digits.
I think the answer is just we're idiots. Carry on, nothing to see here.
2
@PaulWhite i've had many such issues
@PaulWhite Yeah, partner status at the consulting firm I worked for. All of us that worked there were encouraged to get certs. "Encouraged" in that sense that is was part of our annual performance review 😅
@CadeRoux Gotcha.
@JoshDarnell transcriptionism
Hopefully that's the worst -ism I have today.
18:54
DevOoops on my part, that was meant for @PaulWhite
Haha nice.
 
1 hour later…
20:04
@JoshDarnell The only reason to get a certificate
20:26
@Zikato I mostly agree, although I do think it's a good way to get exposed to a bunch of things about a product or set of products.
I had been using SQL Server quite a bit when I took those exams, and I still learned about half a dozen things I'd never heard of.
Like CHECK OPTION. Or sp_addmessage. And GROUPING SETS. Being able to ORDER BY an ordinal position.
The NTILE window function.
SET ROWCOUNT 10
You get to see a breadth of features and options you might not naturally get exposed to, depending on your area of focus.
So I think those exams can be good for beginners, or people exploring a new area of interest in MS tech.
The quality isn't amazing. And it's not going to make you an expert or anything.
20:46
Reading the SQL Server books online front to cover exposed me to a breadth of stuff, but my pea brain only allowed so much of it to stick. But you run into some one-offs of interesting things you rarely hear talked about such as sparse columns, or things that are actually useful like you mentioned, GROUPING SETS and NTILE etc.
When I was looking into it there was nothing but XML, XML, XML
2
@JoshDarnell how often do you use any of those things?
 
1 hour later…
22:22
@ErikDarling GROUPING SETS is usually only useful for those idiotic "we must do the whole report in T-SQL, no apps allowed" situations. But I once used it in anger for an app which needed to show various levels of grouping, and it was far easier to do using GROUPING SETS. I reduced the original proc down from 4 separate queries to 1.
The rest of those are either "meh" or not recommended. Sparse columns looks mildly useful in specific situations, as does CHECK OPTION.
Indexed views was something I came across lateish and have found it very useful.
 
1 hour later…
23:36
@Charlieface even still I’d rather write UNION queries with explicit grouping. Makes it easier to understand and avoids unfortunate spools.
@ErikDarling Not once.
@JoshDarnell attalad
But it was interesting to find out they all exist 😃
23:52
Many things exist Josh
Look up in the night sky once in a while
You're a philosopher at heart.
2
Stop calling me lazy

« first day (4305 days earlier)      last day (861 days later) »