|Don't ask to ask, just ask|
SQL Calculations issueby DrAxeman (Beadle)
|on Aug 10, 2005 at 20:52 UTC||Need Help??|
DrAxeman has asked for the
wisdom of the Perl Monks concerning the following question:
I'm having trouble getting proper averages calculated in my tables. All of the data in my table (a CSV file) is wrapped in quotes. For DBI/SQL to calculate the average on the column, I need to remove the quotes. No biggie, except that some data is in scientific notation. When I do my averages, I'm getting outrageous numbers.
After I strip the "'s and -'s I've got
The true value of these numbers is
How can I get these properly calculated, or should I just grep for these types of numbers and change the value to 0 since they are so small?
Also, if I were to modify the value to 0, what is the regex that would say "if there is an e in the word, change the whole word to something else"?