need help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a text file that I want to import into Access. I have used the
transfertext macro to do this but I get error tables on some of the columns.

About the data:
The data has 116 numeric columns and has 24hrs*31days rows.
The task:
Since each day has 24 hours I would like to press a button on a form and
import as one record. one row of the 24 hr average.
Ex.
For december 2 2005 there will be 24 entries in the text file. I only want
to see the average of each column value entered in a table. At the end of the
month for december there will be 31 entries in the table. Can you help?
 
I hate to say it, but if you've got 116 numeric columns, it's extremely
unlikely that your database is properly normalized.

Assuming you're storing date and time in the same field (as you should be),
the SQL to get 24 hour averages would be:

SELECT DateValue([DateTimeField]),
Avg(Field1) As Field001DailyAvg,
Avg(Field2) As Field002DailyAvg,
....
Avg(Field116) As Field116DailyAvg
FROM MyTable
GROUP BY DateValue([DateTimeField])
 
Back
Top