Data in individual text files

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
RiverRidge
Posts: 1
Joined: Tue Feb 19, 2008 6:45 pm

Data in individual text files

Post by RiverRidge »

My cash register generates a sales report each day that is output as a text file. The format and contents are identical with the data for that day changed. One of the data elements is sales by hour with the number of sales and the dollar volume of sales for each hour of the day.

I would like to compile average sales by hour by day.

I can open the daily files as a text document and can read them into Calc.

I need some suggestions on how to compile them. Other than by brute force of individually copying each Calc worksheet into a master worksheet, I have not had any luck. I have looked at BASE and assume that this is the hammer to use on my nail, but I am not sure was approach to take.

Any suggestions? All comments gratefully accepted.

Later............ jt
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Data in individual text files

Post by Villeroy »

Create a data pilot in Calc with your registered database as source. You can split imported dates and times by Menu:Outline>Group...(F12).
 Edit: See issue 53244, which states that time fields nor date-time fields of imported data don't work. Sorry, this is really annoying.
http://dba.openoffice.org/specification ... tions.html describes all functions that should work with select queries against simple data sources such as text (*.csv). It includes HOUR, DAY, MONTH, YEAR 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
wurzel
Volunteer
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: Data in individual text files

Post by wurzel »

You could also try using the HSQLDB function of declaring text tables (i.e. CSV files) directly as table sources for your database.
To do this, you might want to read up on the HSQLDB documentation first.

Alex
wurzel
Volunteer
Posts: 145
Joined: Sun Dec 09, 2007 10:39 am

Re: Data in individual text files

Post by wurzel »

See here for more info :

http://hsqldb.sourceforge.net/doc/guide/ch06.html


These instructions are SQL statements that should be able to be carried out from within your database document, via the menu
Tools > SQL from within OpenOffice.org once you have created an initial database document.

Alex
Post Reply