Tag Archives: sql

Returning flattened data from a SQL table containing pairs of rows

I like little challenges. The ones that don’t take all day to figure out, but are enough to capture your interest for a little while. Yesterday I had such a problem to solve. I had some data in a table that was basically in ‘pairs’ of rows. It was actually different to the example below, [...]

Posted in Database, SQL Server | Also tagged | Comments closed

Generate SQL Server Inserts from existing data – with Identity Inserts

A good while ago I posted a stored proc that would generate insert statements for table data, along with simple filtering capability. I broke this out again today, as I needed to recreate part of a database on a local machine.  I didn’t have knowledge of the schema so I just went about fixing each [...]

Posted in Setup and Deployment, SQL Server, Tools | Also tagged | Comments closed

LINQ to SQL Connection Strings with Class Library and Web.Config

Most Microsoft technologies that you can operate with a GUI come with some tradeoffs.  Things have certainly improved over the years and now something like the LINQ to SQL designer is pretty trouble free – unless of course you have something like this fairly common scenario: I had a class library (Data Access), and decided [...]

Posted in .NET Framework, C#, LINQ | Also tagged , | Comments closed