[thelist] Tricky SQL

matt g mrg at members.evolt.org
Tue Jun 18 14:39:01 CDT 2002


> From: Ken Kogler <ken.kogler at cph.org>
Hi Ken,
All the big-shots/smart-folks beat me to the answer, but I wanted to stress
this part.

Wouldn't you rather just have a DB where you could do this:
SELECT scores.score, teams.team
FROM scores, teams
WHERE scores.gameDate = yesterday
    AND scores.team_id = teams.team_id
ORDER BY t.team ;

Even if the DB "gets big" with all the scores in one table, it was gonna be
big anyway (and a lot more spread out). This way, the database keeps
everything straight so that you don't have to use "Tricky SQL".

Maybe it's not that simple, but databases were *made* to do this stuff. And
I'm sure that you could get some good advice here on rebuilding the
structure, if you need it.

Matt g




More information about the thelist mailing list