DD, just adding a comma separator for long integers (numbers), as you are suggesting, would be a bad idea> The next thing would be a set of questions to Dr. Hipp: "why just comma separator for large numbers? Why doesn't SQLite support the full feature of locale and formatting depending on language, etc." And so, the full feature for localizing numbers must be added for it. Again, everyone has said it, you can add a small function inside, or after having acquired the number, and format the number there.

just my 64 Dominican cents.

-----Original Message----- From: Dominique Devienne
Sent: Friday, February 10, 2017 1:06 PM
To: SQLite mailing list
Subject: Re: [sqlite] thousand separator for printing large numbers

On Fri, Feb 10, 2017 at 6:53 PM, Stephen Chrzanowski <pontia...@gmail.com>
wrote:

Bringing in "Other Database Engines do it!" discussion [...]


When did I do that?


Any element that is to be portrayed to the users screen should be handled
by whatever UI engine is displaying the information, not something that
handles only three types of data.  The UI needs to translate locality
information.  The date/time in your windows/linux/consoles/etc are
presented to you formatted.  The date and time are stored as a number, not
"Friday, February 10, 2017 12:43:33pm".


And that's exactly why SQLite has date and time functions.
Notably the one converting a number of seconds since the Epoch
into a human readable date time. Which I also use in my views.
That's no different.


SQLite is lite.  It is designed to be run on machines that have KILOBYTES
of memory.  Todays phones and devices that are all the rage do have
MEGABYTES to GIGABYTES of memory and storage, sure, but there are devices
out there that have literally KILOBYTES of data to be worked with.  When
you start adding beautification methods [...]


Adding what? printf() is already here, and already has formatting options.

If the application of your choice isn't displaying the numbers as you want,


You're mistaken. I am explicitly generating a string as a thousand-separated
number using an SQL expression, not explicitly asking as app to display
numbers one way or another. And using printf('%,d', num) instead of a big
and ugly (and limited to billions) SQL expression is a good thing.


Now, if you'd like, you could possibly throw a suggestion for the SQLite3
Client, sure, maybe with a particular command line  option, or, even an
option set in the CLI itself to format numbers to your OS's locale.


Again, I don't want or need implicit number formatting. I do it explicitly.
And again again, I don't need/want locale-aware formatting. --DD
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to