I'm sorry for the confusion...no they are in cvs files now. They get loaded into an access db for processing. In my first of my 3 less-than-stellar posts I had a typo that said 'is working fine', but really it should have been 'isN'T' working fine. The import functions ok unless you try to import the 1st or last file, & when the year rolls over, there is a 2 day waiting period. I could probably fix it in VBA, but it seemed like a great chance to exercise & expand my perl. Maybe I'm wrong. I guess time will tell. Also, every now & then the thing crashes & I have to manually delete several tables just to get it to run again. It's a single user app & he's very patient. It's been thru 3 Windows/Office upgrades. I'd just hoped to enhance it for him in a more stable environment. I'm doing this for free outside of work, just because it saves him about 14 hours that he puts into Excel on his weekend & I need the learning. Thanks again for the help. The monestary has been immeasurably helpful.
| [reply] |
The data looks like this, representing customer counts & sales in 15 min incr. I need totals & percentages for each day, by section (cols 3,4,5/6,7,8, etc).
12/17/2002,0700,001,0000,00000.00,000,0004,00022.15,...
12/17/2002,0715,001,0000,00000.00,000,0012,00036.38,...
12/17/2002,0730,001,0000,00000.00,000,0014,00048.18,...
12/17/2002,0745,001,0000,00000.00,000,0016,00142.67,...
12/17/2002,0800,001,0000,00000.00,000,0023,00008.28,...
12/17/2002,0815,001,0000,00000.00,000,0052,00419.79,...
12/17/2002,0830,001,0000,00000.00,000,0047,00026.52,...
12/17/2002,0845,001,0000,00000.00,000,0071,00028.81,...
Okay. But your still holding back on the details. And there are anomolies in what you are saying.
You say the figures represent "customer counts & sales", but then say a section consists of 3 columns? And when you originally posted, prior to wiping it out with your first update, you said 5 sets of 4 columns?
You say the figures are in 15 minute increments, but originally said each file contained 80 rows. The web site closes for 4 hours each night?
You say "I need totals & percentages for each day, by section". Totals down each column? Totals across each row? What percentages? How many percentages?
You also originally mentioned 366 files, and now mention year end rollover, but make no mention if you are trying to roll up the daily stats across the year?
Finally, you are "doing this for free", to help someone out--and then come here and ask for help. You offer no code. And give no clues as to what part you are having a problem with? Do you know how to open and read a file in Perl?
I'll let you think about what implications people might draw from that lot.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
BrowserUK, My apologies. It's hard to know how much information to give. Yes, I'm holding back on the details. I try not to bother the monks any more than necessary. I've been programming 30 years & I know SOMETHING. The sloppy posting notwithstanding, my original question was not tech related & I didn't think it req'd code samples. Most other languages have a record format structure. Either thru my ignorance or a design flaw, perl doesn't seem to have one. I was merely asking how best to 'structure' the data I have to read in.
The percentages need to be of the total for around half of the columns. The number of cols doesn't really matter, nor the number of rows. 4 x 24 = 96, but not all stores are open 24hrs, so I averaged. Since I need % of totals, I have to either hold the entire file(s) in ram, or accumulate the totals to a temp file. I'm leaning towards a temp file, but I didn't want to look back & wished I'd asked a smart person. ;-)
The first & last file issues & the yr end rollover are Access issues, not anything to do with the app, BUT... another thing I was saving till I could try on my own... was the fact that we have a file for each day, & I need to let the user pick which files to process, there are no year end totals, as such, just final totals for the 2, 5, 7, or 10 (or more) files selected.
Please bare with me, it's a steep learning curve, & my "doing it for free outside of work' part was only to point out that I may not be able to respond as quickly as I would like & I didn't want you to think you were doing my job for me. We have a vendor coming in this week, & I'll be working days AND evenings most of the week, maybe 2 wks. Sorry for any confusion. I'f you'd like to converse privately, I can send you my email address.
Finaly, yes, I can read/write in perl. I've been studying it about 6 weeks now. The regexs are a hoot, but I'll get a grip on them sooner or later. I like to 'try bfore I cry' (help) ;-)
| [reply] |