Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread RSmith
Ensure you store the string representation of the reals (floats w/e) of precise numerical format and length, such that: 0.3, 12 and 1.456 all look alike and sorts correct ex: "000.30" and "001.456000" and "012.00" etc. or whatever similar format you may choose as Simon (I think)

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Simon, > Date: Thu, 20 Feb 2014 14:04:59 + > From: Simon Slavin > > On 20 Feb 2014, at 1:56pm, Patrick Proniewski wrote: > >> Thanks for you reply. In fact I would like the script to remain portable. >> I'm running all this on Mac OS X 10.6.8 (sqlite3 3.6.12) but I

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Donald, On 20 févr. 2014, at 15:16, Donald Griggs wrote: > Am I right that fractional exposures will always have one as the numerator? > I.e., you might record an exposure as "1.5" seconds, but never as "3/2" > seconds? If so, then that might simplify things. Yes, no 3/2, only 1/x and

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Donald Griggs
Hi Patrick, Am I right that fractional exposures will always have one as the numerator? I.e., you might record an exposure as "1.5" seconds, but never as "3/2" seconds? If so, then that might simplify things. The example below creates a column named "canon" to hold the canonical exposure

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Simon Slavin
On 20 Feb 2014, at 1:56pm, Patrick Proniewski wrote: > Thanks for you reply. In fact I would like the script to remain portable. I'm > running all this on Mac OS X 10.6.8 (sqlite3 3.6.12) but I plan to share it > and use it on FreeBSD too. And developing a extension is

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
hi Kevin, On 20 févr. 2014, at 14:11, Kevin Martin wrote: > > On 20 Feb 2014, at 12:54, Patrick Proniewski wrote: > >> My problem is that my database holds too many different values for >> ExposureTime, so the resulting plot is unreadable. I want to be able to >> "bin"

Re: [sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Kevin Martin
On 20 Feb 2014, at 12:54, Patrick Proniewski wrote: > My problem is that my database holds too many different values for > ExposureTime, so the resulting plot is unreadable. I want to be able to "bin" > those values to create a proper histogram. It's not possible to "bin"

[sqlite] calculation of a fraction stored in a text column

2014-02-20 Thread Patrick Proniewski
Hello, I'm coming back with my EXIF database. I have a TEXT column, ExposureTime, where I store the EXIF representation of photograph's exposure time. Sample values: "1/6000", "1/250", "0.5", "1", "6"... I need to retain this representation, because it's how photographers deal with exposure