Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 2 of 2 total |
redefine column using alter table |
Wed, Apr 3 2013 4:58 PM | Permanent Link |
Kees Lagendijk | Hi, I want to redefine field "amountA" from "float" to "currency" with the following SQL: Alter table ledger redefine amountA currency default 0 However, now the fieldname is being changed into currency and - needless to say - that is not what I want. What am I doing wrong? Greet, Kees Lagendijk |
Wed, Apr 3 2013 7:26 PM | Permanent Link |
Fernando Dias Team Elevate | Kees ,
There's no "Currency" SQL type, the equivalent type is MONEY: ALTER TABLE Ledger REDEFINE "amountA" MONEY DEFAULT 0 However, MONEY values are stored as floating point values, exactly as FLOAT, the only difference being the display format. I'm not sure if that is what you are looking for or if instead you are wanting to change it to a fixed-point format like the SQL type DECIMAL (BCD in DbSys); if that is the case then the correct statement would be: ALTER TABLE Ledger REDEFINE "amountA" DECIMAL(19, 2) DEFAULT 0 -- Fernando Dias [Team Elevate] |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |