Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 4 of 4 total |
"_Balance" DECIMAL(20, 2), |
Sun, Mar 11 2007 6:26 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Should this field type allow me to enter 4 decimal places?
Roy Lambert |
Sun, Mar 11 2007 8:23 AM | Permanent Link |
"Ole Willy Tuv" | Roy,
I'm not sure how Tim has implemented the BCD type in ElevateDB, but since ElevatedDB is based on the VCL, I'd guess that declaring DECIMAL(20,2) would actually define a (DECIMAL(18,2)) type. << Should this field type allow me to enter 4 decimal places? >> Numbers are assignment compatible, so specifying a source value having a larger scale than the target column wouldn't throw any errors. However, the stored value should be rounded or truncated to fit the target type. Whether an exact numeric value is rounded or truncated is implementation-defined. Example: create table test (col1 decimal(18,2)); insert into test values (10.2555); select col1 from test The correct col1 value can be either 2.55 or 2.56, depending on truncation or rounding. Some RDBMS use truncation (e.g. Mimer SQL and NexusDB, others use rounding (e.g. SQL Server and Interbase). ElevatDB currently stores the value 10.2555 (scale 4), which looks like a bug since the column type is an exact numeric with scale 2. Ole Willy Tuv |
Sun, Mar 11 2007 9:02 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ole
Thanks. I'll wait for Tim's response on Tuesday (assuming he sobers up after his birthday by then) before deciding wether or not to rounding of fields into my triggers. Roy Lambert |
Mon, Mar 12 2007 4:59 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Thanks. I'll wait for Tim's response on Tuesday (assuming he sobers up after his birthday by then) before deciding wether or not to rounding of fields into my triggers. >> Yeah right, what I'm doing right now is what I get to do for my birthday, my friend. I'm looking into the issue and will let you know. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |