![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
![]() |
Fri, Aug 14 2009 4:48 AM | Permanent Link |
Francisco Fernandez | Hi all.
I have a trigger that have a line like this: . . UPDATE TempCursor SET COSTONETO=NEWROW.PRECIO*(1-(NEWROW.DTO/100)); . . COSTONETO type FLOAT PRECIO type FLOAT DTO type DECIMAL scale 2 when NEWROW.PRECIO=15 and NEWROW.DTO=12,36 COSTONETO=13,20 --->wrong if change to DTO type FLOAT COSTONETO=13,146 ---->ok Can anybody tell me why? Thanks and regards |
Fri, Aug 14 2009 10:51 PM | Permanent Link |
Raul | Francisco Fernandez wrote:
Hi all. I have a trigger that have a line like this: . . UPDATE TempCursor SET COSTONETO=NEWROW.PRECIO*(1-(NEWROW.DTO/100)); . . COSTONETO type FLOAT PRECIO type FLOAT DTO type DECIMAL scale 2 when NEWROW.PRECIO=15 and NEWROW.DTO=12,36 COSTONETO=13,20 --->wrong if change to DTO type FLOAT COSTONETO=13,146 ---->ok Can anybody tell me why? Thanks and regards |
Fri, Aug 14 2009 10:54 PM | Permanent Link |
Raul | Sorry - the mailer ate the first reply
It looks good to me, You're using 2 decimal precision: so 12.36/100 = 0.12 (you have a decimal 2 variable and a constant so result should be decimal 2 variable) 15 * (1-0.12) = 15 * 0.88 = 13.2 Raul |
Sat, Aug 15 2009 3:07 AM | Permanent Link |
Roy Lambert NLH Associates ![]() | Francisco
I don't know what you're using as a newreader (email) client or if you posted directly on the web but please try and avoid a line with just a single dot in it. This is what is used to signal end of message according to the standards so for any standards compliant newsreader client your message stops after "line like this" Roy Lambert |
Sat, Aug 15 2009 3:41 AM | Permanent Link |
Francisco Fernandez | Hi again.
Thank you Raul. Ok Roy. |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |