Let's say you have a table that contains the monthly figures for your army of sales people. At the end of every month, the sales manager asks you to pull a list of his top ten performers from the previous period. What do you do? Well, you could just pull the entire list, ORDER BY the month, and manually count off the top ten. That query might look something like this:
SELECT salesperson_name, sales_total FROM salesdata
WHERE sales_month =
Most IT folks know the SQL ORDER BY clause forwards and backwards. Like the name implies, it's used at the end of a SELECT statement to specify the order of the records returned by the query. For example, if I wanted to query a table called PERSON and sort the results in alphabetical order by last name, my query would look something like this:
SELECT firstname, lastname, age
Sure, this isn't the most timely of reviews. After all, the T-Mobile Dash has been around for months now. Thing is, though, that my Dash keeps giving me new reasons to write about it...
Few months ago, my wife's cell phone died and, since she's not as nerdly as I am, she volunteered to take my phone and let me buy a fancy new one (any wonder why I love this woman?). Anyway, soon as she said that, I ran over to the local T-Mobile store so I could scope out new toys before she had a chance to change her mind. Ended up walking out with the
I was introduced to Adobe AIR (Adobe Integrated Runtime) last week when the Adobe AIR tour bus stopped in Portland, OR for a night of introduction and examples of what the product can do. If you haven't heard of Adobe AIR, as I hadn't before attending the mini-conference, it's a "cross-operating system runtime tha...
I love ad hoc SQL tasks.
Seriously. Call me sadistic, but I think they're kinda fun. Not exactly kickin'-back-with-an-IPA-and-watchin'-Rome-on-DVD fun, but certainly a lot more entertaining than the usual day-to-day grind.
More often than not, those ad hoc tasks somehow involve an Excel spreadsheet. Maybe someone has a spreadsheet with the ID's of various customers who need to be deleted from the database, or maybe they need to update the area codes for certain people. Who knows. Point is that you need to know how to incorporate data from an Excel file just like you would from...
Sometimes, you just expect things to be easy.
Like the first time I found myself actually writing code to solve a real life problem. I had an array of strings I'd populated by parsing a line of text, but the elements were in the wrong order. Couldn't figure out how to swap 'em around so, after a few hours of beating my head with and against various blunt objects, I gave up and asked one of our developers.
"Dude," I said. Developers must be addressed as "dude." And you must bring them an offering when you ask them for help. Cookies are usually sufficient, bu...