Cody Konior Senior Database Administrator

Sum on groups and case sensitivity issues in Reporting Services

Two issues today.

Scared of supermarkets

It was a great night last night, after taking nearly a year off comedy, and coming back and getting some laughs. I feel super fat on stage, part of the reason I stopped, and I'll have to keep working on that:

Little quirk dealing with For Xml

I've been using For Xml in T-SQL for a long time to concatenate things without really investigating the ins and outs of it.

Reporting Services and the T-SQL Time datatype

Recently I was building a mini-database for personal use and was storing separate fields for Date and Time. It seemed like a good idea until I tried to display the time field in SSRS. I found that:

Obscure SSRS messages

Today as I was updating an embedded T-SQL query into a dataset:

Does T-SQL Between work back to front?

While I would usually use Between StartDate And EndDate properly, today I found one mistake where I'd used it back to front and needed to test if it would work:


Another thing I remembered today, is that I rarely use UCase(Fields!Something.Value) in my reports, because prior to 2008 SP1 or SP2 (I forget which), if you called that with a Nothing, it would return a small square character on your reports. If you instead used Fields!Something.Value.ToUpper() you'd get an error or a warning if it was a Nothing, too.

SSMS grey menu items

I've recently been trying out DBForge SQL Complete Express and RedGate SQL Prompt. But after uninstalling them I had grey menu items left over in SQL Server Management Studio 2008. I went through the registry, the file system, and could not find anything left over:


I tend to use StrConv(Fields!Field.Value, vbStrConv.ProperCase) a lot in my reports, but am generally unhappy that it forces characters in the middle of words into lowercase too. I recently came across some camelCase strings where I wanted to split the words and preserve acronym capitalisation, while also capitalising the first letter of each word.

Duh moments: Previous(), and Cross Apply

I came across two little learning experiences this week. Here's hoping someone else is stupid enough to make the same mistakes as me and look it up!

Common Dates For Reporting Services And T-SQL (Part 2)

Sometimes I need to get weeks ending on a certain day, like the week ending as if on Tuesday, or Saturday. It's pretty easy in SSRS expressions, but it's not so easy in T-SQL (if you want to account for @@Datefirst which jumbles the week starting date up). But I did finally work it out and have prepared samples below!

Carried Forward Page Totals

Reports that show financial data often require a carried forward amount, or per-page cumulative total, or running total, to show in the header or footer of the report. Reporting Services doesn't have a good (well described) way of handling this, until now. I'm going to lead you through a demonstration on how to make it really work, and some of the pitfalls (and the workarounds) I found along the way.

Porting VB6 Applications To VB.NET


I took the lead in porting a small (few thousand lines of code) VB6 application to VB.NET and here are some notes I made during the process, in case they're useful for anyone else.

No show Tuesday night

I'm tired. I stay up late every night doing nothing, and my weekends go so fast seemingly doing stuff for everyone else, so much so that they are more stressful than relaxing. I'm feeling down because a couple of people rated my videos down on which I don't understand at all because the audience reacted well and to be honest the standard of videos on isn't that high anyway. And I'm super overweight, I haven't been able to get myself to get back into my exercise regime due in part to that ridiculous lack of sleep from above.

Tweaks make for a good show!

In the very beginning, the MC forgot my name, and it was really embarrassing (for him, but it's no big deal really), and so when I went on stage I moped on and started saying, "Don't feel bad for me, when I was younger:" and then the video begins.

Another last minute show last night!

Last night I had a special call to fill in at Comedy Lounge just a few hours before the show was set to start.

That's wrong

I did another deadpan set tonight, though occasionally found myself slipping into my normal voice a few times, which ruined the effect a little. A lot of my bits didn't necessarily have punchlines but I was thinking they would pull through based on the weirdness/self-deprecation factor.

I won a YouTube award!

I'm the 75th most viewed Australian Comedian of the day on YouTube! Kind of sad if you think about it, but I've never done that before, so thanks everyone!

How to catch a pedophile

This is my new, must-see show!

Preparing for tonight's show

I had put together a set list for tonight but it just didn't flow like my previous acts and because so much material was related to porn, I felt like it didn't represent me properly as a comedian or a person. So I scrapped it.