The Bit Bucket

SQL Question: ROUND() didn't go to the same school I did?

I had an email from a friend today where he asked what was wrong with SQL Server, and wondered if ROUND() didn’t go to the same school that he did.

The example was:

SELECT '0.5' [SOURCE VALUE], '1' [SHOULD ROUND TO], ROUND('0.5',0) [SQL SAYS]
UNION
SELECT '1.55', '1.6', ROUND('1.55',1)
UNION
SELECT '94.55', '94.6', ROUND('94.55',1);

The output was:

What was puzzling him is why SQL Server’s ROUND was converting 94.55 to 94.5 and not 94.6. Now writing numbers as strings is problematic to start with, but that aside, he was puzzled by the output.

2023-07-11

Book Review: Leap First by Seth Godin

I’m a fan of Seth Godin, and have always enjoyed listening to him. Recently I finished listening to Leap First on Audible. 

When I started listing to this book, I didn’t quite know what to make of it. I always enjoy Seth’s anecdotes. At first, the book seemed more like a series of anecdotes than an in-depth treatment of the topic. It seemed to lack a continuous train of thought. I started feeling like I was listening to a collection of anecdotes from Seth, rather than a “real” book.

2023-07-06

Book Review: The Incredible Unlikeliness of Being

Ever since I watched Professor Alice Roberts’ series on travelling Egypt by Train, I’ve been quite a fan of her work. (It also means I probably came to knowing about her later than I should have). Since then, I’ve been working through a number of her books. On Audible, I just finished listening to The Incredible Unlikeliness of Being.

Amongst many other things, Alice is an English biological anthropologist. She also worked as a doctor in the National Heath Service in Wales for a while, but she left clinical medicine to focus on anatomy.

2023-06-11

SDU Tools: List use of Deprecated Data Types in a SQL Server Database -> Updated

I’ve previously posted about the procedure ListUseOfDeprecatedDataTypes in our free SDU Tools for developers and DBAs. I mentioned that I’m often reviewing existing databases and one of the first things I go looking for is the way they’ve used data types, and that in particular, I’m keen to know if they’ve used any deprecated data types (i.e. ones that will/might be removed at some point).

The procedure was updated in version 21 to now include a ChangeScript column. (Thanks to Michael Miller for the suggestion).

2023-06-02

Announcing the Fabric Down Under podcast - Show 1 available now

I’ve mentioned in a previous post how important I think Microsoft Fabric is going to be.

So, in addition to our existing SQL Down Under, and Cosmos Down Under podcasts, we have a brand new podcast called Fabric Down Under.

In the preview for Microsoft Fabric, one of the key participants from the product group has been Pawel Potasinski. I’ve known Pawel for many years and he’s been the driving force behind many important things. It was great to see him driving community around Microsoft Fabric in preview.

2023-05-24

Welcome Microsoft Fabric - Most significant change in Microsoft BI

Microsoft has had a strong lead in BI and analytics for a long time now. The introduction of the tabular data models in 2012 was a watershed moment.

Today, they have announced a private preview of Microsoft Fabric. It’s a bigger deal than the tabular model was, and will set the direction of BI tooling for a long time to come.

The opposition was already struggling to keep up, and in fact, hadn’t managed to do so. Microsoft Fabric will up the ante much, much higher than where we already were.

2023-05-24

Cosmos Down Under podcast 8 with guest Blaize Stewart is now published!

I recently noticed a blog post from Jay Gordon that was calling out interesting content from Blaize Stewart on antipatterns for development with Azure Cosmos DB.

I thought this would be a perfect topic for one of our Cosmos Down Under podcasts and Blaize agreed to take part.

So much content talks about what to do with a product, and even though everyone knows there are things you shouldn’t do, very little content talks about these antipatterns. It was great to speak to Blaize about it, and to get his updated thoughts.

2023-05-17

ADF: Passing a file attachment via a POST to a REST service using Azure Data Factory

I was recently doing work for a client where I needed to replace some Python code that was being used to upload a file attachment to a REST based service using a POST command. I was trying to do it using a Web Activity in Azure Data Factory. What was surprising was how little information I could find on how to do that.

While I can’t post all the code, I did want to post the core parts here in case it helps others, and for my own future reference. The basic steps involve:

2023-04-29

MS Tech Summit 2023 - Discounts running out

We have so many great tech friends in Poland. I was pleased to see they are running the MS Tech Summit, and pleased to be speaking at it.

Looks like a great set of sessions : https://mstechsummit.pl/en/ They tell me there are more than 100 sessions spread over 8 tracks.

Not in Poland? Not a problem. It’s running in-person and online, and with video on demand.

The early bird discount is still available but about to end.

2023-04-28