[Solved] Not able to enter 6.14 as a Number of Decimal

Discuss the database features

[Solved] Not able to enter 6.14 as a Number of Decimal

Postby dreamquartz » Mon Aug 26, 2019 3:59 am

Hello Everyone,

I am using LO 6.2.5.2 and the Split HSQLDB 2.5.0.
I have a record ID as INTEGER and need to have it changed to either Numeric or Decimal ID, to that I can enter a Decimal Number like: 6.14.
What ever I tried, including creating a new table, the record is rounded downward, showing trailing '0'.
Is this a BUG?

Dream

Attached a little DB
Attachments
Numbers.odb
(3.38 KiB) Downloaded 40 times
Last edited by dreamquartz on Mon Aug 26, 2019 6:41 am, edited 1 time in total.
LO 6.x, HSQLDB 2.5.0 & Ubuntu 20.04 LTS.
dreamquartz
 
Posts: 778
Joined: Mon May 30, 2011 4:02 am

Re: Not able to enter 6.14 as a Number of Decimal.

Postby UnklDonald418 » Mon Aug 26, 2019 4:47 am

No bug here.
Right click on table tNumber and select Edit.
Notice that both Number and Decimal fields have 0 decimal places.

It's easy to fix in the Embedded database, but for a JDBC connection you will need something like
Code: Select all   Expand viewCollapse view
ALTER TABLE "tNumber" ALTER COLUMN "Decimal" DECIMAL(10,2)

followed of course by View>Refresh Tables
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1337
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Not able to enter 6.14 as a Number of Decimal.

Postby dreamquartz » Mon Aug 26, 2019 6:40 am

UnklDonald418 wrote:No bug here.
Right click on table tNumber and select Edit.
Notice that both Number and Decimal fields have 0 decimal places.

It's easy to fix in the Embedded database, but for a JDBC connection you will need something like
Code: Select all   Expand viewCollapse view
ALTER TABLE "tNumber" ALTER COLUMN "Decimal" DECIMAL(10,2)

followed of course by View>Refresh Tables

Yup that works.

I tried the same thing, and it did not work.
Scary......

Dream
LO 6.x, HSQLDB 2.5.0 & Ubuntu 20.04 LTS.
dreamquartz
 
Posts: 778
Joined: Mon May 30, 2011 4:02 am


Return to Base

Who is online

Users browsing this forum: No registered users and 6 guests