On 23/11/2015 11:32 AM, Rowan Worth wrote:
> Hi Bruce,
>
> I had a go at post-processing the sqlite3 shell's output to apply thousand
> separators. I don't recommend looking too hard at the sed for the sake of
> your sanity, but the gist is it repeatedly prepends a comma to trailing
> groups of
On Mon, Nov 23, 2015 at 1:57 PM, Bruce Hohl wrote:
> www.sqlite.org/loadext.html states that: "Loadable extensions are C-code."
> Can someone confirm this please.
>
pedantically speaking: the _entry point_ for the extension is C. The
implementation may be in any language.
> If I figure out
On 23 Nov 2015, at 1:02pm, Stephan Beal wrote:
> On Mon, Nov 23, 2015 at 1:57 PM, Bruce Hohl wrote:
>
>> www.sqlite.org/loadext.html states that: "Loadable extensions are C-code."
>> Can someone confirm this please.
>
> pedantically speaking: the _entry point_ for the extension is C. The
>
Hi Bruce,
I had a go at post-processing the sqlite3 shell's output to apply thousand
separators. I don't recommend looking too hard at the sed for the sake of
your sanity, but the gist is it repeatedly prepends a comma to trailing
groups of three digits, and then repeatedly removes commas which
On Sun, Nov 22, 2015 at 8:14 PM, Simon Slavin wrote:
> Of course that too is unlikely to happen, this time for
> backward-compatibility reasons. Maybe it could be a consideration of
> SQLite4.
>
Why keep bringing up SQLite4? AFAIK, SQLite4 has been inactive for a long
time, and not much of a
On 23 Nov 2015, at 7:56am, Simon Slavin wrote:
> On 23 Nov 2015, at 7:41am, Dominique Devienne wrote:
>
>> Why keep bringing up SQLite4? AFAIK, SQLite4 has been inactive for a long
>> time, and not much of a response anytime someone asks about it.
>
> It's a way of telling people who ask for
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
On 23 Nov 2015, at 7:41am, Dominique Devienne wrote:
> On Sun, Nov 22, 2015 at 8:14 PM, Simon Slavin wrote:
>
>> Of course that too is unlikely to happen, this time for
>> backward-compatibility reasons. Maybe it could be a consideration of
>> SQLite4.
>
> Why keep bringing up SQLite4?
On 22 Nov 2015, at 6:18pm, Scott Robison wrote:
> All technically correct (except the implication that a thousands separator
> format is standard, as it is not). But the OP wants to be able to do
> formatting from within SQL as he is using the SQLite shell, thus there is
> no programming
On 22 Nov 2015, at 3:34pm, Bruce Hohl wrote:
> printf
> support for a thousands separator would be nice
One problem with thousand separators is that different countries use different
characters for them. There's an unholy mix of commas, spaces, dots and
apostrophes out there, not to mention
On 11/22/15, Bruce Hohl wrote:
> Within sqlite3.c there are ~1000 lines of printf.c code
> (added in 3.8.3) so it does seem to be a development matter.
Let me clarify that: The printf.c file has been part of SQLite since
the beginning - over 15 years. The SQL "printf()" function was added
in
On Sun, Nov 22, 2015 at 10:34 AM, Simon Slavin wrote:
>
> On 22 Nov 2015, at 3:34pm, Bruce Hohl wrote:
>
> > printf
> > support for a thousands separator would be nice
>
> One problem with thousand separators is that different countries use
> different characters for them. There's an unholy
Thanks for those comments, I now understand better what is being returned.
It seems an easy work around for shell output with thousands separator may
not be possible. Within sqlite3.c there are ~1000 lines of printf.c code
(added in 3.8.3) so it does seem to be a development matter. printf
(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
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> select printf("%15.2f",123456789.12789);
>123456789.13
>
> sqlite> select printf("%'15.2f",123456789.12789);
>
>
>
>
15 matches
Mail list logo