Building a basic e-commerce databaseOver on Discord this week we were asked if the below diagram was “good enough” for a …
Releasing Sequel FormulaIt has been a long time since a blog post was written here, however today we are announcing the …
Validate NHS Number Using A SQL Server Scalar FunctionI was talking to someone recently about NHS Numbers, if you don’t know, an NHS Number is a …
Dynamically creating a SQL Server table with dynamic SQLSometimes there is a requirement to build out a table based on another table in your SQL Server …
Can I change my SQL database while in a restoring stateSo, you have an availability group and one of your databases gets removed, during the time that the …
SQL Server PivotIn this post we are going to have a look at a very basic PIVOT table and how to go about creating …
Where do I start with SQL ServerWhen I first started learning SQL Server I had no idea where to start, it is overwhelming there is …
Creating a configuration system for SSISDo you have a complicated SSIS package that has steps which include configuration where things could …
SQL Server Trace Flag 3226An issue with SQL Server that you might not be aware of is that every time a backup is sucessfully …
What is a primary keyIn Database Design you will often see tables with a PRIMARY KEY these can be seen in the database …
Using SQL Server’s Information SchemaInformation schema’s are one of the methods that SQL Server provides to obtain meta data about …
What’s the difference between CAST & CONVERTIn SQL Server there are two options for converting data from one data type to another in your T-SQL …
The Future Of Rich In SQLRich In SQL as a blog turns 12 months old this year, although I have been periodically posting to a …
Build A SQL Server Availability Group Lab In Hyper-VIn this post we are going to look at creating a Test Lab on our local machine, if like me you …
Getting SQL Server Object InformationIn this post I am going to look at how to find information about objects in all of the databases on …
Apple Health PowerBi DashboardOne thing that I have always wanted to do is explore the data that my Apple Devices capture about my …
SQL Server Moving Objects Between SchemasSomething I always end up forgetting how to do is moving objects between schemas within a database, …
Setting Up SQL Server Databases In DockerDo you ever have a requirement where you want to spin up a database quickly on a test enviroment but …
SQL Server Resetting Identity SeedIn this post we are going to look at re-seeding the identity column on one of our tables, sometimes …
SQL Server Using Comments In Your CodeHave you ever written code that when you come to test there was that one column or line of code that …
2021 Year In ReviewAnother year is complete and when I was thinking about what to write for my year in review post I …
Formula One PowerBI DashboardThe Formula One PowerBi dashboard is an un official dashboard created by RichInSQL using freely …
2021 - Merry ChristmasPhoto By Annie Spratt
This is just a quick post to wish you all a very Merry Christmas, whatever you …
SQL Server Database Trigger To Track ChangesHave you ever had a situation where a change was made to a stored procedure, table or schema in a …
Sending Query Results As CSV Using Database MailSometimes we have the need to send results which are output from our queries to someone via email, …
Configuring SQL Server Database MailIn this post we are going to look at how to configure database mail in SQL Server.
SQL Server Concatenating StringsThere are a number of ways to concatenate strings in SQL server and each will give you a different …
Creating a filterable search using dynamic sqlThere was a situation recently where the developers had built an application in C# but wanted some …
Differences between views and stored proceduresIn Microsoft SQL Server it is possible to create views and also stored procedures, but what are the …
Differences between views and stored proceduresIn Microsoft SQL Server it is possible to create views and also stored procedures, but what are the …
Clarion Date Time To SQL DateTimeClairon date is the number of days that have elapsed since December 28, 1800, in SQL Server this …
[Video] Inner Joins In Microsoft SQL ServerIn this post we are going to take a look at Inner Joins, what they are and how they work.
[Video] Left Joins In Microsoft SQL ServerIn this post we are going to take a look at Left Joins, what they are and how they work.
What are CTEs & How Do They Work?A CTE or Common Table Expression specifies a tempoary named result set for the current session, a …
Removing Duplicate Rows with ROW_NUMBER()Sometimes you will come across a dataset that contains two or more rows of the same data, in a data …
Recording Deleted RowsRecently, we had a user delete a number of rows from a production database by mistake, it transpired …
Strings And NumbersSomething new happened this week, well not new in the sense like buying a new car but new to me, I …
How to Use DatediffIn this post, I want to take a look at datediff, how it works and how I use it as part of my job.
How to Use DateaddWhen I first starting learning T-SQL things like DATEADD took a really long time for my brain to …
Be careful when using Eomonth()In SQL Server 2012 Microsoft added a function called EOMONTH, this returns the end of the month of …
Functions In Views Are BadOne of the things I have spent a lot of time investigating recently is slow running queries, why are …
Building a calendar tableI have been working on a project at work that needed to make use of a calendar, the data warehouse …
Using Scalar Functions Inside A SelectSometimes Scalar functions are useful, other times however they are not but they do have their uses, …
Installing Visual Studio SQL Intergration ServicesIn this post, I am going to show you how to install SQL Server Intergration services for Visual …
Getting Beginning Of Previous WeekIn my new job one of the things I often find myself doing is needing to get the start of the …
Getting First Day Of MonthSo you want to get the first day of the month in SQL server? using DATEADD it is as simple as using …
CHAR LimitationsRecently we had an issue raised that a user was getting an error thrown in the application front end …
Using ChocolateyOne of the most time consuming tasks when configuring a new computer is installing all of the …
Missing In ActionIt is no secret that the past 18 months has been a challenge for everyone, worldwide.
Rebuilding My WorkstationThis year has been incredibly strange to try and bring back some kind of normality I decided to …
Install Jekyll On Windows Using Linux SubsystemI recently moved to a new development workstation at home, still using Windows 10 but it was a fresh …
SQL Server 2014 Service Pack ErrorI had an issue on one node in the new SQL 2014 cluster that had just been built S-SQL06 specifically …
Corrupting databases on purpose with dbatoolsSo here we are going to look at corrupting a database and how we can go about restoring the …
Database Migration Using DbaToolsThis post is mainly for me to look back on in the future and see how this was done, so I will keep …
Exporting Database Names To CSVI needed a way of getting a complete list of databases over multiple instances in SQL Server into …
Moving To JekyllLast weekend I made a decision, after what feels like a lifetime having sites running on WordPress I …
Performing a database upgrade with dbatoolsI was recently asked to move one of our production databases to a staging server, this was to allow …
My Current 2019 SetupI have never done a my setup post here before, I don’t think it ever occurred to me that it …
Inserting data from a selectIn SQL Server it is possible to insert data from one table into another using a select within the …
PowerShell & Corporate ProxyI have been having a problem at work where when I try to either install or update a module on my …
Creating a dynamically populated Grid ViewI haven’t published a post here in what feels like an eternity, I came across a problem …
CHAR(10) & CHAR(13) in SQL Server ColumnsRecently I needed to export some data from a table that was being used to hold information from a …
Building a Formula One Race Tracker – Part ThreeContents
Part One – Project Overview Part Two – Database Schema Part Three – Stored Procedures …
Encryption with symmetric keys & certificatesRecently I was asked to look into the possibility of encrypting some of the column level data that …
Building a Formula One Race Tracker - Part TwoContents
Part One – Project Overview Part Two – Database Schema The Database Schema In Part One we …
T-SQL Tuesday 113 - Tracking All Things VeganThis month’s T-SQL Tuesday comes from Todd Kleinhans (Blog & Twitter) he asked, “what do …
Building a Formula One Race Tracker - Part OneContents
Project Overview Part Two – Database Schema A little while ago I answered a question over …
Taking dbatools furtherLast week I wrote about how I was getting started with dbatools a lot has happened since then, I …
Getting started with DBAToolsI have never really got into PowerShell it is just something that I have never needed to use, …
SYSTEM_USER and it’s limitationsRecently I came across a stored procedure I had written a few years ago, when I first started as a …
Whats eating up tempdbSo, I have a problem, TempDB is blowing up, I don’t know what is causing it but I need to …
How I Configure SQL Management StudioWhen you first install SQL Management Studio (SSMS) there are lots of options shown in the toolbar, …
Installing SQL Management Studio On Another DriveSo you have that really fast SSD in your development machine or that machine that is provided by …
SQL Server And DatesDates are one of the things I find myself googling more than anything else when writing queries, so …
Full Text Indexing Crawl LogsRecently I ran into an issue I had never experienced before, a third party vendor was using …
Check If Database Mail Is RunningSo, recently I ran into a problem where I wasn’t getting any alerts for any of my SQL Agent …
Directory Searcher & Ambiguous Name ResoloutionRecently I was writing a login process that required me to query Active Directory, admittedly …
Managing Agent Jobs in Availability GroupsAvailability groups and SQL Server Agent Jobs, how do you go about managing them?
How I Got Here & Where I am GoingGrab a beverage of your choosing, you may be here for a while…
Let’s warp back in time 15 years, …