oops
you need to select the string length from the column width
select substring('', 1, 16 - length(printf("%2.f",
price))) || printf("%2.f", price) from prices
Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
Just shooting out so no time to test. But could you try something like
select substring('', 1, length(printf("%2.f", price))) ||
printf("%2.f", price) from prices
Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
On Tue, Apr 4, 2017 at 3:47 PM, Hans M. van der Meer
wrote:
> Simon, thanks.
> Now at last, I know how to continue.
>
But SQLite itself ships with a portable version of printf too.
So you can convert your integer or real typed columns into text typed ones
for display,
Simon, thanks.
Now at last, I know how to continue.
2017-04-04 15:03 GMT+02:00 Simon Slavin :
>
> On 4 Apr 2017, at 11:25am, Hans M. van der Meer
> wrote:
>
> > I am building a simple bookkeeping.
> > With PHP and SQLite i now have tables and views with
On 4 Apr 2017, at 11:25am, Hans M. van der Meer wrote:
> I am building a simple bookkeeping.
> With PHP and SQLite i now have tables and views with columns for values and
> prices: not nicely aligned because decimal values are aligned different
> from values that are
5 matches
Mail list logo