[sqlite] method for thousands separator via sed post processing

2015-11-26 Thread Bruce Hohl
Thanks to suggestions on this list I explored the sed post processing avenue and found a solution. There are quite a few sed docs at http://sed.sourceforge.net For my needs I adapted an example from http://www-rohan.sdsu.edu/doc/sed.html (These docs are like ancient scrolls.) # add commas to int

[sqlite] attempt at output with thousands separator via extension

2015-11-23 Thread Bruce Hohl
Gentlemen, thanks all for your comments. Before I posted I knew the thousands separator was problematic for the reasons stated by Simon. I figured it was intentionally left out of sqlite's printf(). I wanted to make sure I was not missing a known or easy solution. As sqweek/Mohit suggested I wil

[sqlite] attempt at output with thousands separator via extension

2015-11-22 Thread Bruce Hohl
support for a thousands separator would be nice ... is there a place for feature requests? On Sat, Nov 21, 2015 at 4:04 PM, Scott Robison wrote: > On Sat, Nov 21, 2015 at 1:47 PM, Bruce Hohl wrote: > > > (1) SQLite will not return output with a thousands separator as follows: > >

[sqlite] attempt at output with thousands separator via extension

2015-11-21 Thread Bruce Hohl
(1) SQLite will not return output with a thousands separator as follows: sqlite> select printf("%15.2f",123456789.12789); 123456789.13 sqlite> select printf("%'15.2f",123456789.12789); (2) C language printf("%'1

[sqlite] printf with thousands separator

2015-10-14 Thread Bruce Hohl
I create quite a few ad hoc queries from data tables with large numbers and the default floating output is a pain to read. I can get the output format I desire with something elaborate like the following but this is too much SQL for ad hoc queries. select substr( replace( substr('