Category: Blog

  • On the Move to SQL Server Connections

    Brian Kelley, speaking on the SQLServerCentral track.

    A bit of a crazy day for me, starting off a crazy week. I leave this afternoon for SQL Server Connections in Orlando, where it’s in the 80F with some rain. It was about 60F yesterday and sunny in Denver, a beautiful t-shirt day and today I woke up to snow on the ground and more coming down now. I’m a little torn, since I’d rather be heading to the mountains to snowboard than the pool to swim, but I am looking forward to SQL Server Connections.

    SQLServerCentral is sponsoring a track, with Brad McGehee, Brian Kelley, and Jonathan Kehayias speaking. We have set up sessions and I’ll be down there as the roving reporter and SSC host, sporting a Hawaiian shirt, my cowboy hat, and  no pants. At least, I’m hoping I get by with shorts for the two days I’m down there.

    We have sponsored a track the last two years and it’s great fun. We get the chance to pick speakers, all seasoned SQL Server experts and presenters that will give you a great experience on the SQL Server track. Unlike PASS, the speakers are invitation only, both from our track, and the SQLskills track, managed by Paul Randal and Kimberly Tripp. Unlike some other events, I always see great sessions at Connections and I am almost never disappointed.

    There’s also great variety since the conference is located in the same hotel as the ASP.NET, Silverlight, Visual Studio, Sharepoint, Exchange, and Windows conferences from the DevConnections event. If you work with multiple technologies, this is the best conference to go to and get a variety of knowledge on different sessions.

    It’s also in a great location. I’m one of the strange ones that likes winter, and I don’t necessarily want it to end quickly, but most people are happy to get away from the cold for a warmer location. The spring event in Orlando, and the fall event in Las Vegas, give you the chance to do that.

    If you aren’t coming this week, keep an eye on the blog for notes and content from the show where I’ll be reporting on sessions, taking some pictures, and perhaps some video. Think about coming to the fall show in Vegas, and get some great SQL information in a great location.

  • SQL in the City – The Red Gate Tour

    Red Gate Software is announcing SQL in the City today, a series of events that will bring a free day of training to a few locations later this year. The events will be free and features specific Red Gate products and solutions to the common problems and situations that many SQL Server professionals face. It’s a mini tour with a few people from Red Gate and a few local speakers as well. We have two dates/locations scheduled so far, and we’re hoping for more soon.

    sqlcitylondon

    London. July 15, 2011.

    Once again I’ll be heading across the pond. I will probably go 3-4 days early since it seems I regularly have issues flying internationally, but I’ll be there, along with fellow Microsoft MVPs Brad McGehee (blog | @bradmcgehee) and Grant Fritchey (blog | @gfritchey). There will be a few Red Gate people and MVP Mladen Prajdić is going to be giving a talk as well. We will be at One Wimpole St, wherever that is in London. Hopefully someone will ensure I arrive at the right place.

    It’s a full day of SQL training and networking, giving you the chance to pick one of two tracks and learn some development tricks and tips, or come over to my track and learn how administrators deal with the problems they face on a regular basis. The agenda has a variety of topics that you’ll want to see. I’ll be doing the Preparation for Disaster talk, showing you some of the issues you might face at work and how to prepare for them, and recover from large and small disasters. It will feature some Red Gate tools that speed up your problem solving.

    There are some other great sessions, and if you will be in London on July 15, 2011, register for the event.

    The City of Angels

    sqlcitylaWe’ll do it again on Oct 28, 2011 in Los Angeles, just before DevConnections. Brad, Grant, and I will be in the City of Angels for a Friday event and probably heading out to enjoy a few drinks that evening.

    The agenda is similar, though Mladen isn’t making the trip across the water  (lucky guy). Instead we have MVP and MCM Denny Cherry, expert on hardware, virtualization, and security in SQL Server joining us to talk encryption and how you should protect your data.

    This event will be at the Skirball Cultural Center in the Santa Monica mountains. A great location, and one I’m looking forward to visiting.

    If you’ll be in LA, please register and come see us.

  • Playing Catch-Up

    I haven’t had to work on the Database Weekly newsletter in a month, and I knew my time was coming, but for some reason I didn’t realize it was this week. My calendar didn’t remind me, or if it did I ignored it. When I closed down work yesterday I thought it was strange that I didn’t see a newsletter scheduled and after volleyball this morning I thought I should check.

    Yep, my week.

    So I’m jamming this morning, trying to get a newsletter built and scheduled.

  • How Many Bytes Are In My Column? – T-SQL Functions

    One of the things you want to be aware of when writing T-SQL is using the proper function for a particular problem. Someone posted a question asking about why they were getting a 0 for this code:

    SELECT Mychar
        , '''' + mychar + ''''
       FROM dbo.MyTable

    That gave me these results

    mytable1

    I used the quotes in order to show that one of my columns has spaces trailing in one of the columns. I noticed that the poster was wondering why they had these results?

    SELECT Mychar
        , LEN(mychar)
       FROM dbo.MyTable

    mytable2

    In the table, clearly there are 4 characters for the row with “4D” and 5 characters for the next row. However the length is being returned as 0. If you were planning on testing for blank strings, or using some substring function, this could be an issue.

    The reason is simple. LEN, as noted in Books Online, ignores trailing spaces. The description of the function is: Returns the number of characters of the specified string expression, excluding trailing blanks.

    So if you have a space at the end of your string, or just a string of spaces, you don’t get the correct length. What should you use?

    Datalength – This function is designed to show the number of bytes used by the string, not the characters. Code shown below:

    SELECT 
       MyID
     , '''' + mychar + ''''
     , LEN(mychar)
     , DATALENGTH(mychar)
       FROM dbo.MyTable

    mytable3

     

    A good thing to be aware of if you are writing string test routines. LEN is the function I know most people use, but it is somewhat flawed, IMHO, in T-SQL