Re: numeric in plpgsql function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've already changed the declaration from float4 to numeric.. 
 
It is working now..Thanks to you! ;)
 
However, the salvage value in my table is float4/real... Do i have to change it also to numeric?? The salvage value I'm referring to is actually a percentage value like user will input 10%, 35.5%..10 and 35.5 is stored in the table as float4/real..
 
Need another one of your good advices..
 
TIA!
 


Michael Meskes <meskes@postgresql.org> wrote:
On Wed, Oct 01, 2003 at 05:34:08PM -0700, Gezeala 'Eyah' BacuXo II wrote:
> salvagevalue float4;
> ...
> -- depexpense := ((acqamt - (acqamt * salvagevalue))/ life) * manth;

I haven't checked in detail but I guess that the whole calculation is
done as float since one variable is float. Please make sure numeric
calculation is used as the differences you see may very well come from
the float datatype.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!


Marie Gezeala M. Bacuño II 
IS Department
Muramoto Audio-Visual Phils., Inc.
MEPZ1, Lapu-Lapu City, Cebu, Philippines 6015


The person with the ultimate cachinnation possesses, thereby, the optimal cachinnation.




---------------------------------
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux