Home after Seattle (Redmond) Code Camp 2012

What a great day at  Code Camp today.

Click here to download the slides and sample code from the presentations.

The first presentation that I attended was  Accelerating your Development Workflow presentation by Ian Davis.  What a great presentation, it touched on the lean and agile development processes, it was very well done.

The next one was a PowerShell presentation that was okay, then I presented the following three sessions.

What’s New in TSQL 2012

Unleashing Common Table Expressions in SQL Server

The CTE presentation is currently my most polished presentation, it was first presented at SQLSaturday in Redmond a few months back.

SQL Server Performance for Developers

I hope that everyone who attended had a great time, and learned something new!

Code camp 2012.

image

Code Camp Schedule… The photo is pretty bad, but if you could see it you would see my three sessions.

Code Camp in Redmond Today—

I am headed to Code Camp in Redmond WA today.  I ended up with 3 sessions that I will be presenting, and I am really looking forward to the day.

I am looking forward to attending the Accelerating your Development Workflow presentation by Ian Davis.

Here is what I am presenting…

What’s New in TSQL 2012

This is the first time that I will be presenting this one.  Its going to be a lot of fun working with the new features in TSQL 2012.

Here is the summary of what I will be covering:

Unleashing Common Table Expressions in SQL Server

This will be about the 5th time I have used this presentation.  Just some quick polish and it will be ready to go.  I recently presented this session at SQL Saturday in Redmond and SQL Saturday in Vancouver BC.  One new addition to this session is the performance comparison between the SQL Server 2012 OFFSET/FETCH functionality and the data paging capability of a CTE.

Here is the outline of the presentation:

SQL Server Performance for Developers

Probably one of the most valuable database sessions for developers, although until you have experience bad performance with SQL Server it’s a hard sell.

  • —Is Tuning Necessary for the Developer
  • —Understanding Tables and Indexes
  • —Understanding Execution Plans
  • —Statistics IO and TIME
  • —Understanding Table Size
  • —Procedure Cache and Parameterization
  • —Seven Deadly Sins
    • —Poor or No Database Design
    • —Index Design Issues
    • —RBAR instead of Sets
    • —Not using explicit column lists
    • —Calculations in the WHERE Clause
    • —Dirty Reads
    • —Believing Moore’s Law Will Save You
  • —Tips For Writing Queries

Code Camp is today in Redmond WA, I hope to see you there.

TSQL 2012 CHOOSE Function

In SQL Server 2012 there is a new function called CHOOSE that takes in an offset, and a list of options.  Choose is a function that returns the item at a specific index.

Syntax:
—CHOOSE(index, val_1, val_2, val_3, …)
—If the index is greater than the number of values or less than 1 it returns NULL
—Easier than using a CASE statement in some examples.
Example:
</div>
<div>
-- CHOOSE
-- returns the item at a specific index
declare @corners as int = 6
SELECT choose(@corners, 'point', 'line', 'triangle', 'square',
 'pentagon', 'hexagon', 'heptagon', 'octagon')

-- the old way using case.
SELECT CASE @corners
 WHEN 1 THEN 'point'
 WHEN 2 THEN 'line'
 WHEN 3 THEN 'triangle'
 WHEN 4 THEN 'square'
 WHEN 5 THEN 'pentagon'
 WHEN 6 THEN 'hexagon'
 WHEN 7 THEN 'heptagon'
 WHEN 8 THEN 'octagon'
 else NULL
 END;

In the above example, the CASE statement and CHOOSE function do the same thing, but the CHOOSE function is a bit easier to write.Here is another example

-- CHOOSE day of week example
DECLARE @day as int=4
SELECT CHOOSE(@day,'Sunday','Monday', 'Tuesday',
              'Wednesday','Thursday','Friday','Saturday')
For choose and other new TSQL functionality in Server 2012 take a look at my What’s New in TSQL 2012 presentation, which will be presented at Seattle Code Camp on June 16th.

Sessions Submitted for SQL Saturday – Olympia

SQL Saturday 166 in Olympia WA on November 10th was announced, and that one is close enough to drive to.  I have submitted 2 sessions for this event.

 

What’s New in TSQL 2012

By November, this with be the fourth or fifth time presenting this one.  Its going to be a lot of fun working with the new features in TSQL 2012.

Unleashing Common Table Expressions in SQL Server

Just some quick polish and it will be ready to go.  I recently presented this session at SQL Saturday in Redmond and SQL Saturday in Vancouver BC, and will be presenting it a Code Camp in Redmond next week.

Sessions for Code Camp in 2 weeks

Here are the sessions that I will be presenting at Code Camp in two weeks..

What’s New in TSQL 2012

This is the first time that I will be presenting this one.  Its going to be a lot of fun working with the new features in TSQL 2012.

Unleashing Common Table Expressions in SQL Server

This will be about the 5th time I have used this presentation.  Just some quick polish and it will be ready to go.  I recently presented this session at SQL Saturday in Redmond and SQL Saturday in Vancouver BC.

SQL Server Performance for Developers

Probably one of the most valuable database sessions for developers, although it is hard to convince developers of that.

Code Camp will be on Saturday June 16th 2012 in Redmond WA.