The Bit Bucket

T-SQL 101: 9 Finding out what's in a SQL Server table

In the last post, I described what tables were, and then showed how to view their contents using an option in Object Explorer in SQL Server Management Studio (SSMS).

If you’ve ever seen a SQL query of any type, you will have seen one like this:

It says to return all columns from the table, and to return all rows.

Fair enough.

But there are a few things to understand about this simple statement:

2019-03-19

SQLBits - A World of Free SQL Server and Data Information Online

There are many SQL Server events around the world each year, and many are just awesome events. One that has grown non-stop and is currently my pick of these events is SQLBits.

Our UK buddies behind this (currently Simon Sabin, Darren Green, Annette Allen, Jonathan Allen, and Alex Whittles) have created an event that all others should be looking to.

I love the way they combine technical content with fun.

2019-03-18

Our new online on-demand SQL Server Reporting Services class is now live!

Need to learn SQL Server Reporting Services or know someone else that needs to?

We’ve been working hard to move all our popular in-person training courses online and on-demand, so anyone in the world can take them.

Our SQL Server Reporting Services for Developers and DBAs course is now out the door.

This is the same course that we run as the first day of our 5 day BI Core Skills course. And it’s not just videos, there are:

2019-03-16

Book Review: Any Ordinary Day by Leigh Sales

Leigh Sales is a well-respected local journalist. I feel some affinity for her, as she’s grown up in Queensland and often comments on things from her childhood that I clearly remember, even though Leigh is younger than me. I was fascinated to read her book Any Ordinary Day: Blindsides, Resilience and What Happens After the Worst Day of Your Life.

I decided to read her book before I knew anything about it at all. I knew it was “Any Ordinary Day”. I hadn’t realized it was “Blindsides, Resilience and What Happens After the Worst Day of Your Life”, so it was quite an unexpected story for me.

2019-03-15

SQL: What's negative rounding in SQL Server T-SQL?

I remember being pleased some years back when I finished reading all of SQL Server’s Books Online (now just the documentation pages for T-SQL and SQL Server). The more of those pages I read, the more I was fascinated by small things that I hadn’t noticed even though I’d used the product for a long time. There’s so much to SQL Server and even just to T-SQL, that I still find unexpected things all the time.

2019-03-14

SDU Tools: TrainCase and KebabCase in T-SQL

In our free SDU Tools for developers and DBAs, a number of the string formatting functions have been quite popular, and we keep getting requests for even more.

Today’s post highlights another two of these. TrainCase is words with the first letters capitalized, then separated by underscores. KebabCase has dashes as separators. It’s named because it looks like a kebab.

You can see them (and some others) in action in the main image above, and in this video:

2019-03-13

Opinion: A little plea to developers - no more desktop shortcuts by default

A quick piece today to talk about something that still seems to drive me crazy.

Why oh why do so many applications still default to putting a shortcut on the desktop when you’re installing them? And this applies to even very current applications.

I installed Chrome on some machines yesterday, and again, no question during install, but desktop shortcuts created.

Haven’t we moved on past this?

Nowadays, there really isn’t a need to plaster shortcuts all over the desktop for all the applications on the machine. And it’s counterproductive anyway.

2019-03-12

T-SQL 101: 8 What are tables in SQL Server?

I mentioned previously that databases hold collections of information about related things. But what are these “things”? Well, that’s what the tables are.

Tables are the most basic objects that live in a database. They hold information about one type of thing. You might call the things “entities” but it’s not 100% accurate. It’s the same problem if you call them “objects”. They aren’t really objects. They basically are just “things” that we’re storing information about, like employees, books, cinemas, products, and more. ANSI SQL called them “relations”.

2019-03-11

Book Review: The Hard Thing About Hard Things

I recently read The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers by Ben Horowitz. I was interested to read it because Ben is a well-known and experienced entrepreneur, based in the Silicon Valley area south of San Francisco. He offers advice on how to really run startups.

I loved the way that Horowitz addressed failure. Instead of taking the business school approach of telling you how things should be done, and assuming that you’ll do everything correctly, he spends time telling you what to do after you’ve already screwed up.

2019-03-08

Shortcut: Accessing script files and folders in SQL Server Management Studio

This one is a very simple and quick tip.

When working in SQL Server Management Studio (SSMS), I often need to open File Explorer in the folder where the script file is stored. Turns out there is an easy way to do that.

There are two interesting options when you right-click the tab at the top of a query window:

Note that you can open the containing folder for the script. You can also copy the path to the script into the clipboard.

2019-03-07