Justin Cooney

Web Development Tips and Examples

Category: SQL Server 2008

  • In an earlier article I reviewed how to query an Excel spreadsheet from SQL Server Management Studio (SSMS). I’ve found that this functionality is very useful, especially when working with data maintained by business users outside of a database system. For an overview of how to connect SSMS with an Excel WorkSheet, please see my detailed article covering…

  • Problem: I encountered an interesting problem today. I had a SQL Server table with many records in it that I needed to clean up. Specifically, I needed to find all duplicate records in the table, but keep the first of each of the duplicate records. The table also contained several rows of detail information that…

  • Running an ad-hoc query from SQL Server SSMS to an Excel spreadsheet is amazingly straightforward using the OpenRowset command. Here’s how it’s done… For starters, copy the Excel spreadsheet to a location where the installed version of SQL Server can access it. This is necessary since your query in SSMS (SQL Server Management Studio) will…