Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Best data type for value representation on EDB?
Tue, Jan 15 2013 11:52 AMPermanent Link

Mario Enríquez

Open Consult

Hi,

I'm migrating a FireBird ER to EDB and would like to know which data type is the best to represent the following values:

For monetary values we use a domain "CURRENCY" that is defined as NUMERIC(15,4).

For percent values we have domain called "PERCENT" that is defined as NUMERIC(3,2)

For Quantities (materials and goods), a domain  "QTY" that is also defined as NUMERIC(15,4).

Anyone could share some advice please?

Regards,
Mario
Tue, Jan 15 2013 3:30 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Mario,

EDB doesn't implement domains, but all you have to do is to replace your domains with the following type declarations:

"CURRENCY" -> NUMERIC(15,4)
"PERCENT" -> NUMERIC(3,2)
"QTY" -> NUMERIC(15,4)

Also, you can interchange NUMERIC and DECIMAL if you like, because in EDB they are equivalent, and always use 19 precision digits no matter what you indicate, so you can also declare then as:

"CURRENCY" -> DECIMAL(19,4)
"PERCENT" -> DECIMAL(19,2)
"QTY" -> DECIMAL(19,4)

and still achieve the same result.


--
Fernando Dias
[Team Elevate]
Tue, Jan 15 2013 4:22 PMPermanent Link

Mario Enríquez

Open Consult

Thanks Fernando!

Regards,
Mario
Image