Skip to content

Michael Bowersox's Blog

Menu

  • Photography
  • Resume
  • Contact

SQL Server

Dynamic PIVOT With Microsoft SQL Server

The PIVOT keyword in Microsoft SQL Server is a godsend when you need to manipulate row values into their own columns. Unfortunately, to use this PIVOT keyword, you need to supply all of the possible values that you would like

Michael Bowersox March 18, 2013March 10, 2014 SQL Server No Comments Read more

Using a Custom IDataReader to Stream Data Into a Database

In a previous post, I discussed how to use the SqlBulkCopy class along with a SqlDataReader to quickly stream data from one database to another.  The reason that you can use a SqlDataReader as a parameter in the WriteToServer method

Michael Bowersox December 22, 2011March 10, 2014 .NET, C#, SQL Server No Comments Read more

Streaming Data Between Databases using SqlBulkCopy and SqlDataReader

One little known fact about SqlBulkCopy is that not only can the WriteToServer method use a DataTable, but it can also use any object that implements IDataReader.  Since the SqlDataReader object implements the IDataReader interface, it is a perfect candidate

Michael Bowersox December 1, 2011March 10, 2014 .NET, C#, SQL Server No Comments Read more

Recursive Queries Using CTEs

I previously explained the basics of common table expressions (CTEs) as well as how to chain them in sequence when you need multiple temporary result sets to get the results you desire.  One of the topics I have not covered

Michael Bowersox November 9, 2011November 29, 2011 SQL Server No Comments Read more

Determining Database Size in Microsoft SQL Server

We’ve all experienced a database administrator coming up to us and questioning why a SQL Server database is consuming so much disk space.  If you’re like me, you would immediately run the sp_helpdb stored procedure to see if the log

Michael Bowersox September 2, 2011September 21, 2011 SQL Server No Comments Read more

Multiple CTEs in Sequence

In a previous post, I discussed how to use common table expressions to generate temporary result sets that can read from and written to.  In this post, I’ll show how to use two CTEs together for more complex scenarios. To

Michael Bowersox February 13, 2011February 16, 2011 SQL Server No Comments Read more

Intro to Common Table Expressions

Common table expressions (CTEs) are a powerful feature that was added to Microsoft SQL Server 2005.  Common table expressions can be thought of as a temporary result set that can be used with one single SELECT, INSERT, UPDATE, or DELETE

Michael Bowersox January 28, 2011January 31, 2011 SQL Server 1 Comment Read more

RSS

   

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Tags

.NET Apple ASP.NET ASP.NET AJAX Asynchronous Computation Expressions C# Charting Cocoa Common Table Expressions F# Feature Receivers Objective-C Page Methods SharePoint SharePoint CustomActions SharePoint User Profiles SharePoint Web Parts SharePoint Web Services SQL Server Themes Threading Visual Studio WPF WSPBuilder XCode

Web Comics

  • Cyanide & Happiness
  • xkcd
Copyright © 2023 Michael Bowersox's Blog. All rights reserved. Theme Spacious by ThemeGrill. Powered by: WordPress.