[thelist] Tricky SQL

Ken Kogler ken.kogler at cph.org
Tue Jun 18 14:10:07 CDT 2002


Once again, back asking for help... :)

I've got multiple tables in the same database that are identical in
structure, but not in data. (this is a sports database, so the "men's
soccer" table is identical to the "women's soccer" table, yet they have
different data in the rows).

What I want to do is use a wildcard for a table name. Something like:
"SELECT score FROM * WHERE gameDate = yesterday" to get all scores for all
games played by all teams in all sports for yesterday.

Any solutions to this?

The only thing I've come up with is to put every sport into the same table
(which would get HUGE real quick), and just mess with it that way. I'd
rather separate the sports into their own respective tables, since that's
they way my brain is wired (it just makes sense...) but I don't think I can.

Thoughts?

-Ken




More information about the thelist mailing list