Mickey's T-SQL Ponderings

Sharing my tidbits of knowledge on T-SQL, SSRS, and whatever catches my fancy.

April 14, 2014
by Mickey Stuewe
0 comments

A Date At The End of The Month

MCJJ_ALLFour SQL professionals gathered from the four corners of the world to share their SQL knowledge with each other and with their readers: Mickey Stuewe from California, USA, Chris Yates from Kentucky, USA, Julie Koesmarno from Canberra, Australia, and Jeffrey Verheul from Rotterdam, The Netherlands. They invite you to join them on their quest as they ask each other questions and seek out the answers in this collaborative blog series. Along the way, they will also include other SQL professionals to join in the collaboration.

The Second Mission

This month our team is tackling windows functions. My particular take on the subject is near and dear to my reporting heart. How to get date ranges based on full months.

End of the Month

Dates tend to be a critical component of most metrics. They define the boundaries of the data. They create groups of data that can help with trending patterns and forecasting. The downside has always been the slicing and dicing of the date. For instance, if you need to group all the data by the last day of the month. You need to create an equation like this to determine the last day of the month:

DATEADD(day, -1, CONVERT(date, CONVERT(varchar(2), DATEPART(MONTH, DATEADD(month, 1, SomeDate))) + ‘-01-’ + CONVERT(varchar(4), DATEPART(year, DATEADD(month, 1, SomeDate)))))

Or this:

DATEADD(month,1,DATEADD(DAY,-DATEPART(DAY,GETDATE()) – 1,GETDATE()))

In SQL2012 the EOMONTH() windows function was introduced. Now you just need to type this:

EOMONTH(SomeDate)

Performance Perks

Not only are you able to write a simpler equation that is easier to maintain and understand, but you get  some performance perks too.

I ran a query using both the “old way” and the “windows function way”  against a table I created with a million rows of data. The data set returns 561 rows of aggregated data. I aggregated all the data by using the last day of the month. I then looked at the execution plans and the statistics for these queries.

SELECT
     DATEADD(day, -1, CONVERT(date, CONVERT(varchar(2), DATEPART(MONTH, DATEADD(month, 1, SomeDate))) + '-01-' + 
          CONVERT(varchar(4), DATEPART(year, DATEADD(month, 1, SomeDate)))))
     ,COUNT(SomeDate)
FROM
     DemoProgramming.dbo.TestData AS td
GROUP BY
     DATEADD(day, -1, CONVERT(date, CONVERT(varchar(2), DATEPART(MONTH, DATEADD(month, 1, SomeDate))) + '-01-' + 
          CONVERT(varchar(4), DATEPART(year, DATEADD(month, 1, SomeDate)))))
ORDER BY
     DATEADD(day, -1, CONVERT(date, CONVERT(varchar(2), DATEPART(MONTH, DATEADD(month, 1, SomeDate))) + '-01-' + 
          CONVERT(varchar(4), DATEPART(year, DATEADD(month, 1, SomeDate)))))

SELECT
     EOMONTH(SomeDate)
     ,COUNT(SomeDate)
FROM
     DemoProgramming.dbo.TestData AS td
GROUP BY
     EOMONTH(SomeDate)
ORDER BY
     EOMONTH(SomeDate)

Findings

1. When breaking up a date to reconstruct it, you need to go back and forth between data types. The optimizer isn’t very fond of that. In fact you get a warning about the possibility of your cardinality being questionable. The EOMONTH() windows function doesn’t have this problem.

 

SQLCoop2_ExecutionPlan

 

2. The EOMONTH() windows function takes less CPU and can return values faster. For this particular execution, I received a 5.25 times faster CPU time and 3.5 times faster execution time.

I used the following code to turn on Statistics:

SET STATISTICS IO ON;
SET STATISTICS TIME ON;

 SQLCoop2_Statistics

 

But Wait! There’s More

This particular function has an additional (optional) parameter. The parameter will allow you to add/subtract months from the end of the month. Which means you can easily find the beginning of the month using this equation:

SELECT DATEADD(DAY, 1, EOMONTH(GETDATE(), -1)) as boMonth

This also allows you to easily create a one year range for the last 12 full months using these two equations:
SELECT
DATEADD(DAY, 1, EOMONTH(GETDATE(), -13)) AS StartDate
,EOMONTH(GETDATE(),-1) AS EndDate

Outside the Box

You are probably telling yourself that you can do everything I just showed you by grouping data by the Month() function. Yes, that is true, but you need to think outside the box for the application. What about those wonderful companies who think Months are not contstrained by Day 1 and Day 31? (You know who you are. They have business rules like, “the 5th day of the month”. Ah! Now we got something we can work with.

SELECT DATEADD(DAY, 5, EOMONTH(GETDATE(), -1)) as FifthDayOfMonth

Don’t Stop Yet

If you want to read more about Windows Functions, don’t forget to check out these blog posts:

To follow our quest for SQL knowledge through this collaborative project, follow the #SQLCoOp tag on Twitter.

See you next month!!

Original Post: On a SQL Collaboration Quest

February 25, 2014
by Mickey Stuewe
5 Comments

On a SQL Quest Using SQL Search by Red Gate

OLYMPUS DIGITAL CAMERA

Four SQL professionals gathered from the four corners of the world to share their SQL knowledge with each other and with their readers: Mickey Stuewe from California, USA, Chris Yates from Kentucky, USA, Julie Koesmarno from Canberra – Australia, and Jeffrey Verheul from Rotterdam – The Netherlands. They invite you to join them on their quest as they ask each other questions and seek out the answers in this collaborative blog series. Along the way, they will also include other SQL professionals to join in the collaboration.

Original Post: On a SQL Collaboration Quest 

The First Mission

For our first collaborative entry in this blog series, we have chosen to investigate Red Gate’s FREE tool, SQL Search. The question we posed to each other was: What is the purpose of Red Gate’s SQL Search and how do you use it in your daily work life?

The Search Begins

Right now I’m in retro-fit mode at work. I have an application that I recently inherited that needs a new feature. This requires me to add new columns to tables in the database(s), as well as find all the objects (Stored procedures, triggers, etc.) that reference the tables I need to modify to make sure they will still work and to add logic to support the new feature.

Red Gate has a whole suite of tools for me to use on my current adventure at work, but the tool I used the most this past week was their FREE tool, SQL Search. This tool will work with SQL 2005 and up.

Instead of writing about how to use SQL Search, I want to highlight some shortcut keystrokes that will improve the speed of using this awesome tool. Did I mention it is a FREE awesome tool?

The Task

I have a set of tables that I modified and I need to look at the code for all the objects that reference that set of tables to not only make sure they still worked properly, but to add code to support the new feature that was added. I’ll use the Adventureworks2008R2 database in my example below.

After I found the list of objects I needed to inspect, I did the following:

  1. Scripted out the object as an ALTER statement.
  2. Quickly searched for the table in the script (some of the scripts were 1000+ rows long).

Here is my favorite part

If you double-click one of the objects in the SQL Search list of found objects, that object will be found and selected in the in the Object Explorer. Unfortunately, if that object is a view, it takes several mouse clicks to get an ALTER script created, soooo

With the help of Mark Holmes (b|t), we figured out what the hot key combination is to script out the highlighted object as an ALTER statement. You ready? SHIFT  F10 + S+A+N. Yes, that is a lot of keys, but if you are like me, keystrokes are faster than mouse clicks.

Note: I remember it as SHIFT F10 + SAN

The CTRL + F shortcut will take you into the Find dialog box where you can search for the name within the script. If you had been searching  for the same value prior to this script, then F3 is your best friend and it will take you directly to the search term in the ALTER script.

But wait! There’s more

If you are a Red Gate junkie like myself and have SQL Prompt installed, then there is another shortcut you can add between SHIFT + F10 + SAN and F3.  If you use CTRL K + CTRL Y then you can have the alter script formatted to your taste. (aka, you can read it faster. Win!)

Note: I remember it as CTRL + KY

image

Scenario Time

So here is what it would look like if you were using the Adventureworks2008R2 database and looking for the Person table.

  1. Enter Person into the search field
  2. Select the “Exact Match” option. (Optional)
  3. Select the “All Objects” from the list of objects
  4. Select “All Databases” from the list of databases (The search term is automatically searched. Hitting ENTER is not required.)
  5. Click on one of the objects listed
  6. SHIFT  F10 + S + A + N to create an ALTER script
  7. CTRL K + CTRL Y to format it (this step requires SQL Prompt)
  8. CTRL  F to pull up the SSMS search window to search within the script
  9. Type in Person and click enter. You’ll be taken to the first instance of Person
  10. Use F3 to find the other instances of Person in the script

Now to look at a second script. You already have the list of objects, so you don’t have to search for them again.

  1. Click on one of the objects listed.
  2. SHIFT  F10 + S + A + N to create an ALTER script
  3. CTRL K + CTRL Y to format it (this step requires SQL Prompt)
  4. Use F3 to find the other instances of Person in the script

Repeat these four steps for each script you need to look at. Win!

Don’t Stop Yet

If you want to read more about SQL Search, don’t forget to check out these blog posts:

To follow our quest for SQL knowledge through this collaborative project, follow the #SQLCoOp tag on Twitter.

February 24, 2014
by Mickey Stuewe
3 Comments

On a SQL Collaboration Quest

Announcer: Twelve SQL Professionals started on a quest.

Director: No, no. They were FOUR SQL Professionals.

Announcer: Four Professionals started on a quest to find the sequel to the Holy Grail.

Director: No, no. They were SQL Professionals and they were on a quest for knowledge.

Announcer: Oh, right, right.
Four SQL Professionals started on a quest for knowledge and not for the Holy Grail. All though it could be said, that knowledge is the ultimate Holy Grail and it is always sought by the wise. The four SQL Professionals, Mickey Stuewe, Chris YatesJeffrey Verheul, and Julie Koesmarno (MCJJ for short) gathered from the four corners of the world: California – USA, Kentucky  - USA, Rotterdam - The Netherlands, and Canberra - Australia to meet at a local Skype tavern to determine the direction they would take on their quest for knowledge, and not for the Holy Grail.

After much eating and drinking, they rejoiced (Yeah!!!!). They had found the path for salvation.

Director: No, no. They found the path for their quest of knowledge.

Announcer: Right, right.
After much more eating of chocolate and drinking of whiskey, they rejoiced (Yeeeaaah!!!). They had found their path for knowledge. They decided they would pose questions to each other and respond as a group through their blogs at  mickeystuewe.com, chrisyatessql.wordpress.comdevjef.wordpress.com, and mssqlgirl.com. They decided they would also ask other SQL professionals they encountered along their way on their quest.

So now here, their quest begins at the Bridge of Death… (I hope they know the answers to the questions, or this collaborative series will be very short.)

BridgeBridgekeeper: Stop. Who would cross the Bridge of Death must answer me these questions three, ere the other side he or she see.

Lady Mickey: Ask me the questions, bridgekeeper. I am not afraid.

Bridgekeeper: What… is your quest?

Lady Mickey: To seek knowledge about the SQL world and not to seek the Holy Grail.

Bridgekeeper: What… is your favorite color?

Lady Mickey: Red.

Bridgekeeper: What… is the purpose of Red Gate’s SQL Search and how do you use it in your daily work life?

Lady Mickey: Funny you should ask that. I have this post that I’m publishing tomorrow. In fact, we each have a unique answer to that question. ButYou’ll have to wait until 2pm GMT tomorrow.

Stay Tuned

Please visit the following links to see the unique views of my collaborators.

To follow our quest for SQL knowledge through this collaborative project, follow the #SQLCoOp tag on Twitter.

February 11, 2014
by Mickey Stuewe
4 Comments

T-SQL Tuesday #51- Don’t Crap Out While Betting On Table Functions

My good friend Jason Brimhall (b|t) is hosting this month’s T-SQL Tuesday blog party. The party was started by Adam Machanic (b|t) in December of 2009. As a compliment to the upcoming debut of the Las Vegas SQL Saturday, Jason has taken up a betting theme. He wants to know our stories of when we bet it all on a risky solution and won or lost.

Instead of telling you about the past, I want to help you win big at the table today. I really don’t want you to crap out while betting on the wrong table functions.

Snake Eyes

There are two types of table functions Multi-line Table Functions and In-Line Table Functions. There is a huge difference between the two of them.

Multi-line table functions sound great. You write as much code as you need in them and they will return all the data in a table variable. This is where the weighted dice rolls snake eyes every single time. You see, the statistics for a table variable always, always says there is only one row in the table being returned. It doesn’t matter if there are a hundred, a thousand, or a million rows. The statistics will say one. Which means the optimizer has a good chance of loosing when it picks the execution plan for that query.

Let’s Take a Look at the Bets

For my example, I have a simple query that returns 43 rows out of a Tally table. Notice that the index estimates 43 rows will be returned, which is great, because that is exactly on the money!

TSQLTuesday51_1

 

If we put that same query inside of a multi-line table function, we get an estimated number of rows of 1 (snake eyes!).

 

TSQLTuesday51_2

 

TSQLTuesday51_3

 

Double Down

An in-line table function will return the same result set, but there are some limitations on its construction. The entire query within the in-line table function needs to be done in only one statement.

Note: You can get very creative with Common Table Expressions (CTE) if need be.

There are two benefits to using an in-line Table Function. One, is that the Estimated Number of Rows will be accurate (or as accurate as the statistics on the table), and two, the “inside” of the in-line table function is not masked in the Execution Plan. It is plopped right into the middle of the calling query. (Yes, “plopped” is a technical term. )

 

TSQLTuesday51_4

 

TSQLTuesday51_5 

Last Call

SoRemember to double down on in-line table functions and don’t crap out on the snake eyes of the multi-line table function.

Thanks for all the fish

Thanks go out to Jason Brimhall for hosting this month’s T-SQL Tuesday blog party. Please visit his website at http://jasonbrimhall.info/, or better yet come to Las Vegas for their SQL Saturday and thank him in person.

February 3, 2014
by Mickey Stuewe
0 comments

Questions and Answers for Pragmatic Work’s Presentation on the Tablix Control

ChalkBoardThursday, January 23rd I had the opportunity to present for Pragmatic Works as part of their “Training on the T’s” where they provide free one-hour training every week on Tuesdays and Thursdays. I gave my presentation entitled, Scalable SSRS Reports Achieved Through the Powerful Tablix. Below are the questions (and answers) that the attendees asked during my presentation.

View Presentation
Slide deck and demos downloads

Questions and Answers for Demo 1

Q: In the first presentation, the 1st tablix, do territory group and country region has the same datasets, meaning does country region have territory?

A: A tablix or a set of nested tablix can only use 1 dataset. My dataset joined several tables, two of which were Sales.SalesTerritory and PersonCountryRegion. (I’m using the Adventureworks2008R2 database.)
Here is how they are related:
SELECT
cr.Name AS CountryRegion
,st.Name AS Territory
FROM
sales.SalesTerritory AS st
JOIN Person.CountryRegion AS cr ON st.CountryRegionCode = cr.CountryRegionCode

Q: When you add a Row Group with that new column that doesn’t let you merge with the other cells to the right… what you can do is split that column, and then you’ll be able to merge.

A: Yes. This is true, but you still can’t merge across the dotted lines that are introduced into the Matrix.

Q: I always supposed that group levels had to be to the left of the dashed line. But you showed that you can delete those columns/rows but keep the grouping. Does this have any effect on the data in the columns on the left or the right of the dashed line?

A: No, it does not. If the GUI asks If you want to delete only the row/column or the row/column and the group, make sure to indicate that you only want to delete the row/column. This will keep the group, which is what we were after.

Q: Did you have to create the row groups (lower left corner), or were they available dimensions?

A: I’m not sure about this question, please email me some more information so that I can answer the question better.

 

Questions and Answers for Demo 2

Q: Could you have added the expression on the image itself and not add the extra row?

A: Not for this technique. If I would have added the expression to the image to show/hide it, then it would have left “white space” where the image would normally go when the image was hidden. By repeating the row with a different layout, we can reclaim the ‘white space” for the comment field to use.

Questions and Answers for Demo 3

Q: For creating the Emp Phone list, is there a reason why you used a table and created the group as opposed to using a matrix? Thanks!

A: This is a great question. You can use either controls and end up with the same result. I had been demonstrating the matrix control in the other demos, so I wanted my viewers to see how you could start with a table. This becomes handy if they requirements of the layout change. It’s important that you know that you don’t have to start all over, but you can change one control into the other because all three controls (table, matrix, and list) are all based on the Tablix template.

Q: For you last demo where you had dynamic columns for phone numbers, what did you have to change in the detail row?

A: In the detail row, I had to change the detail row to a group. I did this by going into the Detail group properties and adding a group on BusinessEntityID. I then added Last Name, First Name, and BusinessEntitty ID as the fields to sort by. This step is needed because the employee names are repeated once for each address type and each phone number type.

 

General Questions and Answers

Q: How did you make your color palette?

A: This is a great question. Here are the steps.

    1. Add a table to a blank report that will become your template report
    2. Create a cell for each color in your color pallet.
    3. Change the dimensions of each cell to have a height of 0.15 and a width of 0.15.
    4. Change the background property of each cell to a different color in your color pallet.

Now you can make the other changes to the report to create a template report and save it in the template folder for BIDS/SSDT.

Q: How to avoid the columns getting merged on exporting to an excel

A: This is one of those questions that is helpful to also explain to all your end users since they ask the same question. The answer is not the best answer, but it is better than what we had 10 years ago. If you save your report as a CSV file, Excel will still automatically open it and the columns will not be merged. The downside is you lose charts and any formatting. The upside is the columns are no longer merged and the end user can use more functionality of Excel. They do need to be reminded that they will have to save it as an Excel file after opening it in order to save any formatting features that they have added to the file.

Q: Is there a way to fix the tablix to a set number of rows, and an exact amount of vertical space for the tablix? It seems that the tablix ‘reserves’ some additional space below the tablix which interferes when placing report items below the tablix.

A: This can be a challenging problem and it requires a lot of testing if different results set sizes to get the layout to work out the way you want. I will be creating a blog post soon on how to mimic a “fixed row” layout. You can contact me to get the the blog post early if you want.

I haven’t noticed the tablix control “reserving” space. To best figure out what is causing this extra white space do the following. Show the lines on the outside of the tablix and the control that you want to “butt up” against the tablix control You may find that the extra space is on the inside of the control instead of the outside of the control. A couple of properties to look at as are padding and Borderwidth. By changing them, you will reduce white space.

I have noticed that it can be difficult to drag and drop another control right up against another control. In those cases I do some math. By adding the Top and Height properties of the tablix you get the location of the end of the control. Then add 1 or 2 more to that value to have the Top value for the next control.

Q: Is there a way to link one tablix to multiple Datasets?

A: Unfortunately no, but there are some workarounds. There are a couple of functions that were introduced in 2008 R2 that will allow you to reference a value in another dataset, but it won’t allow you to show multiple values. A second way is to use a subreport within the tablix. I try to minimize this, since it can add ALOT of overhead. The third way, would be to create a larger dataset with repeating data that can be grouped. This is what I did in my third demo in order to create multiple addresses and multiple phone numbers for each employee. Again, you have to weigh the benefit of the technique against how much data will be used in the report.

Q: This is a great presentation. How can I get a copy of the RDLs, and the datasets?

A: You can go to my resource page to download the presentation and the demos. Pragmatics has the recording so that you can watch the presentation again. I’ve also provided the links at the top of this post.

Q: Will a transcript or summary of this demo be available for review?

A: You can go to my resource page to download the presentation and the demos. Pragmatics has the recording so that you can watch the presentation again. I’ve also provided the links at the top of this post.

Q: Will you be sharing your ‘Knowledge Based Document’ with us?

A: Unfortunately I can’t, because I don’t have references in it for code I found on the internet or in books. I will however be spending time writing short posts with tips this year, so keep an eye on my blog and on mssqltips.com for posts.

 Q: Thanks – this was a great presentation.

A: Thank you. I’m glad everyone enjoyed it and that everyone had so many questions. :)

January 14, 2014
by Mickey Stuewe
7 Comments

T-SQL Tuesday #50 – Automation Equates To Saved Time

SqlTuesday50Hemanth D (b|t) is hosting this month’s T-SQL Tuesday blog party. The party was started by Adam Machanic (b|t) in December of 2009 and we hit the 50th “episode” this month. Could this be coincidentaly occurring during the 50th anniversary of Doctor Who?? I think not…

Anyhow, the topic this month is automation.

I can play that in 3 notes

There used to be a game show called Name That Tune. A contestant had to underbid the other contestant on what the minimum number of (musical) notes they needed in order to recognize a piece of music. Automating tasks remind me of this game show. First, you automate step one, then step two. Each time you tweak it and tune your automated process, you’re seeing just how far you can go… and how little manual work you are left with.

The first step

I’m going to talk about automating the first step of creating an SSRS report. I’ll be working with SSRS 2012, but the steps are the same for 2008 and 2008R2. The only difference is WHERE you store the templates so that they can be easily leveraged. Since that is the last thing you do, you’ll have to wait for the end of this post. So, hold on to your Tardis, and let’s go!

The first thing you need to know, is what are all the common elements to all of your reports. Here is a list of the elements I found to be the same on my reports:TSQL Tuesday 50 - Image 1

  • The location of the title: While my title was different each time, the font, font color, font size, and location remained static. So I created a placeholder for my title.
  • The company logo: The company logo was static as well as its location.
  • The color scheme: Since I used the same five colors, I created a temporary “pallet” for my colors. This was a mini Tablix control, with each of the five cell’s background color set to a different color in my pallet. I left it on the report until I was done setting all the properties of the report, then I deleted the Tablix. (No more looking up the colors in my documentation. Win!)
  • The location of the parameters: I personally think that the parameters should always be displayed on the report. This helps when troubleshooting a paper/pdf copy of a report. It also lets the users know the boundaries of the data they are looking at. (Note: While not depicted in my image, I put my parameters under the logo.)
  • The company address: Static location.
  • The confidentiality notice: Static location.
  • The page numbers: Static location.
  • The report identifier: This is a special number that helps you identify your report. Mine always has three parts.
    • TX or DW to mark the report as having transactional or data warehouse based data. This allows me to speak intelligently about a report that someone shows me in a meeting, especially since our data warehouse data was always older than our transactional data.
    • A number that corresponded to the documentation for the report. In our case, it was the TFS (Team Foundation Server) number.
    • An iteration number. This iteration number was specific to how many times the report was re-introduced into production. This allowed me to verify that the user was looking at the latest copy of the report, and it allowed me to document how many times the owner had requested changes to the report.
Creating the templates

A template is an RDL file saved in the templates folder. I created three templates for my team. Each template was identical to the others, except for two things. The paper size and orientation. I needed to make different templates to accommodate these attributes so that the controls that were centered or right aligned ended up in the correct location for viewing and printing.

  • SSRS 2008(R2) Location: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
  • SSRS 2012 Location: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
But wait! There’s more

If you want to go a bit further with your templates, you can add a watermark that can be leveraged during development all the way through user acceptance testing. The watermark will then be suppressed in production. The watermark says DRAFT. I found it helped with certain end users, who were getting caught up in the data (even though it was fake) and they weren’t focusing on the design and algorithms present in the report.

Here are the steps to add the dynamic watermark:

  1. Create a table in the database that contains the name and ID of the environment you are in, plus a parameter that dictates whether to show or hide the watermark. Note: You can also use this table to point to development file locations for documents and development URLs referenced in your reports.
  2. Add an image to the background of the report body that says DRAFT.
  3. Set the Background Repeat property to Repeat
  4. Create a data source in the report that points to the environment table you created in step 1 (preferably through a stored procedure).
  5. Use the data source to hide or show the background image of the report.

If you use shared data sources, then add the data source to the template directory so that it can be added to new projects the same way report templates are.

There you have it! You just automated quite a few (initial) steps for creating SSRS reports.

Thanks for all the fish

Thanks go out to Hemanth for hosting this month’s T-SQL Tuesday blog party. Please visit his website at http://sqlchow.wordpress.com/.

January 13, 2014
by Mickey Stuewe
2 Comments

Tribal Award Winner for Best New Community Voice

2013 was an amazing year for me and winning this award was the cherry on top. I want to not only thank the people who voted for me, but for the people who nominated me.

Thank You!

I appreciate your belief in me and for accepting me into the SQL Family.

While we can’t all clap together, we can tweet our approval. Please help me recognize the four others who were nominated with me. It’s a big planet, and they have contributed in their countries and abroad to be noticed and nominated too.

  • Koen Verbeeck (b|t) from Belgium
  • William Durkin (b|t) from Germany
  • Rob Sewell (b|t) from United Kingdom
  • Mark S. Rasmussen (b|t) from Denmark

Very Sincerely,
Mickey Stuewe

January 13, 2014
by Mickey Stuewe
1 Comment

I Will Be Speaking This Month for Pragmatics

Microphone_YetiThis month I will be sharing my popular presentation, Scalable SSRS Reports Achieved Through the Powerful Tablix on Pragmatic’s webinar series, “Free Training on the T’s”. I will be going over different ways to use the Tablix control in this one hour presentation and it will be aired live, on 1/23/2014, 11:00 AM EST / 8:00 am PST. Click here to sign up.

December 31, 2013
by Mickey Stuewe
0 comments

Reflections in the 2013 Mirror

2013Reflections-lake2013 was a wild ride. I had set up my goals in December of 2012 and surpassed some of them half way through the year. I hope that I continue reaching my goals in 2014. If I do, it will be another amazing year.

Here are the goals I had and how I measured up.

Being Mentored

I knew I wanted to be mentored, I even wrote a post about it here. I had no idea how valuable it would turn out to be. After I wrote my post, one of my friends convinced me to ask Grant Fritchey (b|t) if he would mentor me. I really like his speaking style and the topics he speaks on. So, I held my breathe, sent him an email, and he said yes. I couldn’t believe it.

We Skyped all through 2013. Our meetings were very valuable for me. You see, like many people, my confidence isn’t that high, but Grant believes in me. He encouraged me to go after my goals. He critiqued my abstracts and even my first speaking event. This was definitely an achieved goal.

Speaking

This goal I blew out of the water. My goal was to speak at 5 events. I picked this number because there are 5 SQL Saturdays in California where I live. I ended up speaking at 15 different events. I exceeded my goal by 300%! Here is the full list of 2013 events and here is a summary of the events:

  • 6 User Group Meetings
  • 5 SQL Saturdays
  • 3 Women in Technology panels (I moderated 2 at SQL Saturday’s I was already attending, so I didn’t count them in the total count)
  • 2 Red Gate events (You can view one of my sessions here.)
  • 1 Conference (Dev Connections)

I’ve already listed the SQL Saturday’s I plan to apply for. The conferences will be added as I’m accepted as well as the user group meetings. Here is the list of 2014 events so far.

Blogging

My blogging goals were only half met. The first part of my goal was to write on my personal blog (this one) at least once a month. Since I like to participate in the T-SQL Tuesday Blog Parties, I knew this was most likely achievable. The other half of my goal was to write once a month for mssqltips.com. I did not reach this goal at all because there just wasn’t enough time. I was only able to submit one tip this year.

For my person blog, I exceeded my expectations. Since this was my first full year having a blog, I compared the first half of the year with the second half of he year. In that time, I doubled my page views. I had 40 posts for the year, 18 of which were in December, 8 of which were for the T-SQl Blog Party, and 1 was an incredibly fun (and funny) story based on the pictures that Pat Wright (b|t) took at PASS Summit.

Here are the 3 posts that had the most hits this year:

Obtaining a New Job

It took six months of carefully identifying exactly what I wanted to do and going through interviews and talking to recruiters, but this past July I finally took a leap into a new job and I’m glad I did. I miss my former colleagues, but I’ve acquired some pretty cool new ones too.

Friends of Red Gate (ForG)

Red Gate has my absolute favorite tools. They also have some amazing people working for them. This year had the privledge of being part of their Friends of Red Gate program. This program conects various proffesionals who are power users of their products with developers and project managers at Red Gate. We get to disucss new features and how to improve existing features. It’s a wonderful program and I think their product is better for having the program.

Unexpected Surprises

Those were my goals for 2013, but I had some surprises along the way that have shaped me this year and are worth mentioning.

Jan 2013 SQL CruiseSQL Cruise

In December of 2012 I won a trip (the registration) on Tim Ford’s (b|t) SQL Cruise from SQL Sentry. The cruise was for a week in the Caribbean. Three wonderful days at sea listening to amazing speakers like Kevin Kline (b|t) and Allen White(b|t). And three wonderful days in port. I thoroughly enjoyed my experience and recommend it to ALL of you.

Authoring

Half way through the year, Marlon Ribunal (b|t) approached me and asked if I wanted to help finish the book he was writing on reporting services. I was very honored that he asked me and I said yes. Marlon and I had our book published this past October. It’s called SQL Server 2012 Reporting Services Blueprints.

I also had the honor of being included in an ebook by Red Gate called 45 Database Performance tips for Developers. I’m very honored to be included in this endeavor with Grant Fritchey (b|t), Jonathan Allen (aka Father Jack) (b|t), Phil Factor (b|t), K. Brian Kelly (b|t), Ike Ellis (b|t), and Louis Davidson (b|t).

Volunteering

I was so impressed with the first SQL Saturday that I ever attended, that I agreed to help out with two local SQL Saturdays (Huntington Beach and San Diego). Since I enjoyed the planning and running around with my head cut off, I’ve agreed to help out again this next year.

I also help the Women In Technology virtual chapter (WIT). I had the honor of moderating three panels this past year, one of which was at PASS Summit in front of 600+ people. You can view the event here.

One of my most proud moments occurred this month, but it really started in September. (You can read the back story here.) I created an event for Jason Strate (b|t) and Bradley Ball (b|t) so that they could speak in Orange County. I had no idea if one person would show up or 100. QuickStart Intelligence hosted the event and they helped find attendees by calling all of their former students. Between my contacts, QuickStart’s former students, and Jason and Bradley’s reputations I was able to get 48 people sign up and around 30 people attend the event. I also found a sponsor for the pizza so it didn’t cost me or any of the attendee’s a dime. I call that a win!

Nominations

I thought that my 2013 SQL year was at a close once December hit, but I was wrong. Red Gate put out a call for nominations for their new Tribal Awards and I was nominated for Best New Community Voice. I wrote about it here. All that I can say about this one, is that I’m pleasantly surprised and that I’m secretly hoping that Koen from Belgium wins.

2013CheersThank You

I want to thank all of you for reading my posts this year, for the comments that you leave, and for coming back time and time again. Cheers to you!

Where am I going now?

So what does 2014 hold for me? You’ll have to wait for my next post. (Evil grin inserted here.)

December 23, 2013
by Mickey Stuewe
0 comments

Tribal Awards – Nominated For Best New Community Voice

In December Red Gate introduced the Tribal Awards. Some of the awards are fun like “SQL Karaoke Performer of the Year” and others are more serious like “Blog of the Year”. They collected nominations and I found out that I was selected for “Best New Community Voice”. I’m very honored to be included with the other four gentlemen… all from Europe.

  • Koen Verbeek from Belgium
  • William Durkin from Germany
  • Rob Sewell from United Kingdom
  • Mark S. Rasmussen from Denmark

Now that the nominees have been selected, the community can now vote for the winners of the Tribal Awards, but be quick. The voting ends on January 3rd with the winners being announced on January 7th.