SQL Server 2008 R2 code sample