This article explains how to query and remove duplicate entries from a Microsoft SQL database using T-SQL. The same model works both for Azure Databases (in Azure SQL Query Editor) and databases on MS SQL Server (using SSMS – SQL Server Management Studio). I had to do this a while back due to a bug in an API creating multiple entities with the same content – save for the Identity field. Fun! Background Why bother? That’s a (somewhat) valid question. A table in a SQL…Continue reading How to clean up duplicates from MS SQL Database?
Every now and then you run into a situation, where you really need to run some SQL against your local development database. That database, at least in my case, is hosted on your local SQL Server Express. Connecting to a local SQL Server should be a walk in a park, right? Eh, well… While using a connection string to connect to said DB is easy, you can’t do that with the SQL Server Management Studio. I wish you could, but hey – it is what…Continue reading How to access local MSSQL server using SQL Server Management Studio?