Eternalistic Designs

Taxonomy

Using ASP.NET AJAX CascadingDropDown with Visual Basic and a Database

Feb 15, 2008
12 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

This morning, I had the chance to play around with another ASP.NET AJAX control:  the CascadingDropDown control.  Like the name implies, it's a nifty little AJAX-enabled control that dynamically enables and populates a DropDownList based on the value selected in a previous list.  Kinda like the coding version of those old skool "Choose Your Own Adventure" books.

You've seen this kind of thing in action plenty of times, I'm sure.  Remember the last time you filled out a registration form that had you pick a country, then ...

Oh, Joy! More JOINs!

JOINing Tables in INSERT, UPDATE, and DELETE Queries

Aug 17, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

In our last SQL post, we talked about the three basic types of JOINs enterprising young SQL junkies might use to gather data from different tables in their databases.

"Enterprising..." Oh, how I crack myself up some times. Seriously. Don't make me explain why that's funny.

Anyway, in between Star Trek-related examples, we blabbed on and on about INNER JOINs, three kinds of OUTER JOINs, and the almost completely useless CROSS JOIN. You might remember, though, that every one of those brilliant examples involved querying existing data with SELECT statements. T...

JOIN the Dark Side

Aug 14, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

When you've been playing around with SQL for awhile, you start to take your knowledge of JOINs for granted. When someone asks you about JOINing data from two or more tables together, you get this stunned look on your face... You know, the same one you get when you actually hear someone mutter the words "I've never seen 'Star Wars'." You forget that you, too, once didn't know a JOIN from a Jedi, and that everyone has to start somewhere.

So let's talk about JOINs. Like the name implies, a JOIN is simply a method for connecting two tables in a database, usually through so...

Fun With GetSchemaTable

Moving Data From MS SQL 2005 Express Edition to MySQL

Aug 07, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

Couple of weeks ago, I was doing some work on a personal Nerdly project on one of my laptops. That particular machine has a copy of SQL Server 2005 Express Edition already installed, and I often use that for my development needs. Has a good number of the same features that the full-blown SQL Server 2005 editions carry, but it's free to use, distribute, etc. Hard to beat that.

Anyway, using Microsoft's SQL is all well and good for most of my work projects, but this personal project is going to live on my webhost's boxes, and my cheap webhosting account doesn't include MS SQL datab...

LIMIT, OFFSET, and TOP

Get the Range of Data You Really Want

Jul 31, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

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 = 




Get Your ORDER Your Way

Using CASE to modify SQL ORDER BY output

Jul 24, 2007
2 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

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





Pulling Data from Excel

Enter OPENROWSET

Jul 09, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

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...

Show Me Some of the Money

Finding Two-Digit Values in Four-Digit Columns

Jul 06, 2007
0 comments
Submitted By: Justin Stanley
Filed Under:
Share our glory:

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...