If you had one big table then

Select year, month, day, location, time_wind
>From dataTable
Where year >= '#minyear#'
And year <= '#maxyear#'

If there are multiple tables then you need more then one query.

Select year, month, day, location, time_wind
>From dataTable2001

Select year, month, day, location, time_wind
>From dataTable2002 

ect


It would be best to have a table such as:

Id, year, month, day, location, time_wind

And id being the primary key where id auto increments.

Having a large table in a database is not issue and is probably a simpler
approach.

A quick google showed that for SQL server:

There is no maximum number. You can keep adding rows until the database runs
out of space. As far as other maximums go :-

SQL                6.5   SQL 7.0 
Database size      1 TB  1,048,516 TB
File size          32 GB 32 TB
Files per database 32    32768

(http://www.windowsitpro.com/Articles/ArticleID/14356/14356.html?Ad=1)


Paul


-----Original Message-----
From: John Barrett [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 19 September 2007 4:12 PM
To: CF-Newbie
Subject: multi-table DB

Hi,
I have a huge database of daily records(about 60 years),and I have made a
table for each year. I am confused what is the best way to have CF get all
the data?

for one year I can just do a cfquery of the table, no problem here, but if I
want to view lets say 10 years of data, how would I go about this?

the db as the form of:
year month day location time wind

I was thinking I could use "year" as the primary key, but then changing
changing the years is what leaves me so confused. I say this as I think that
the first db field has to be the primary key?

I hope that I wrote this good enough to where you can make sense of this and
send  some help. I could also show sample code as well.

Somebody told me why not just have everything in one table, but then that
would be way too big I think.

Thank you very much,
John 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3061
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to