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.300000" and
"001.456000" and
"012.000000" etc.
or whatever similar format you may choose as Simon (I think) suggested so that you will have those values correctly
sorted/grouped/distinct-ed in any string-based SQL function. A further enhancement I like to do in such cases is add some alpha char
in front, like:
"F01.456000" and
"F12.000000" etc.
so that any output I do create, which invariably ends up being copied to excel or calc or such, does not get confused with actual
numerals and stripped of leading zeroes etc. It's much easier to apply a formula to make that into numerals should the need arise,
than to avoid it being done automatically sans the leading alpha char.
On 2014/02/20 20:50, Patrick Proniewski wrote:
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 regular REALs.
The example below creates a column named "canon" to hold the canonical exposure
string value for sorting and grouping.
It assumes any non-decimal fractions will begin with the string "1/"
Thank you for this example, the idea of storing the computed number into the database is
very good and made me rethink the initial database feeding. I'm using exiftool to script
EXIF reading from my files. exiftool has a very nice option that allows the reading of
raw data. Exposure Time, displayed in "raw" is the REAL equivalent to my
strings: 1/200 is read as 0.005. Very handy.
I'm going to redesign my database in order to include raw data aside
human-readable data when I need it.
thanks,
Patrick
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users