Question SQL command runding the number to 2 digits automaticly! Why?...

Mucip

New Member
Hi,
I'm using Progress 10.1b on Linux server. I have a table and I have field in the table as decimal and formated ">>>,>>>.99<<"...

I'm adding the rows from VB 2010 Express by below SQL command:

INSERT INTO pub.Inventor (Part_Code,Denisty) VALUES ('Left Arm', 0.6678)

But When I browse this table in 4GL I see 0.67 value only?!

Why!?... It should be 0.6678, shouldn't it?!...

Regards,
Mucip:)
 

TheMadDBA

Active Member
What is the decimals attribute set to for this field? I am going to guess it is set to 2 based on your example.

Display format doesn't control what can and cannot be stored in the database. For decimal fields the decimals attribute controls the precision after the decimal point.
 

TheMadDBA

Active Member
No problem at all.

It is common issue with Progress.... especially since every other data type doesn't have any real restrictions :)

Just be aware if you decide to change the decimal precision there will be a lot of steps required to make sure everything works the way you expect (existing data, application code, etc).
 
Top