On Thu, Mar 28, 2002 at 12:28:40PM -0500, Johnson, Shaunn wrote:
> -- While I do, what about this:
>
> -- * Append all of the 2000 and 2001 tables into one table
> -- * Make index of columns in the one table
> -- * For updates and new imports, create a
> -- method to only append new data / updates
> -- (I imagine this is where the trigger function comes
> -- in, right?) when I have to pull data (the source tables
> -- will be much smaller ... hopefully ...
Right, the trigger will only fire on insert/update/delete, so you'd
have to populate the big table manually. But after that, with a
trigger on all the source tables, any change you make there will also
be reflected in table_all.
Note that doing it this way is a very un-SQL-ish thing to do, in that
you'll have redundant data all over the place. Still, given what you
already have, doing it this way might be a quick and dirty answer for
looking at the big table. Of course, if you hardly ever reference
the big table, maybe it isn't worth the storage cost.
A
--
----
Andrew Sullivan 87 Mowat Avenue
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M6K 3E3
+1 416 646 3304 x110