Re: Best data type to use for sales tax percent

Поиск
Список
Период
Сортировка
От Christophe Pettus
Тема Re: Best data type to use for sales tax percent
Дата
Msg-id 1BB5F376-C6A5-419B-A87F-2F3BF15258AA@thebuild.com
обсуждение исходный текст
Ответ на Best data type to use for sales tax percent  (Mike Christensen <mike@kitchenpc.com>)
Список pgsql-general
On Oct 8, 2009, at 3:04 PM, Mike Christensen wrote:
> I'm guessing numeric(2,3) should
> be fine, yes?

Numeric is definitely what you want.  You probably want at least four
fractional digits, since sales tax (at least in California) is
routinely set to a quarter of a point.  For example, the basic sales
tax rate in Los Angeles is 9.75%, so 0.0975.  (There are other
subtleties in sales tax calculation in California; feel free to ask
off-list if you want more utterly non-PostgreSQL-related detail. :) )

--
-- Christophe Pettus
    xof@thebuild.com


В списке pgsql-general по дате отправления:

Предыдущее
От: Steve Crawford
Дата:
Сообщение: Re: Best data type to use for sales tax percent
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Best data type to use for sales tax percent