Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Currency field - migrate - Float or DECIMAL (20,2)
Thu, Jan 14 2010 2:16 AMPermanent Link

Peter
Hello

I have quite a few DBISAM currency fields that are migrated to EDB as Float fields. Would it be better to change the field type to DECIMAL (20,2)
after the migration, and before the EDB version is rolled out?

I imagine that I would have to create a new field, copy the float column's value to it, DROP the float field, then rename the decimal field.

Any suggestions on the matter?

I'm using ansi 2.03 Build 4. Thanks in advance

Regards

Peter
Thu, Jan 14 2010 2:01 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Peter,

<< I have quite a few DBISAM currency fields that are migrated to EDB as
Float fields. Would it be better to change the field type to DECIMAL (20,2)
after the migration, and before the EDB version is rolled out? >>

It will be easier to deal with rounding, so yes, I would recommend it.

<< imagine that I would have to create a new field, copy the float column's
value to it, DROP the float field, then rename the decimal field. >>

Nah, just use this:

ALTER TABLE MyTable
ALTER COLUMN MyCurrrencyCOLUMN AS DECIMAL(19,2)

--
Tim Young
Elevate Software
www.elevatesoft.com

Image