On Sun, 2013-06-16 at 04:59 -0700, Chirag Mittal wrote: > Dear Kanitchet, > > Please try this > > SELECT (260739.94 * (1.00/365.00))::numeric(20,7) > > I am a beginner but I think we need to explicitly mention the "output" > format required to get accuracy. >
Nope, you simply need to use the right datatype. If you use a floating point datatype (which is what happens when you don't specificy the type), you cannot claim to get exact precision. If you need the accuracy, you need the numeric datatype (just as you did with the query above). -- Guillaume http://blog.guillaume.lelarge.info http://www.dalibo.com -- Sent via pgadmin-support mailing list (pgadmin-support@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-support