Thread: Decimal precsion?

Decimal precsion?

From
"Zot O'Connor"
Date:
create table subzone (       subzid        integer,       subzsid       integer DEFAULT NEXTVAL ('subzone_seq'),
subzdescr    varchar,       subztaxper    decimal(0,4),       subzvendid    integer,       subzwhsid     integer,
subztaxship  integer
 
);
ERROR:  DECIMAL precision 0 must be beween 1 and 1000


Is this documented anywhere?  By the way it should be "beTween."


-- 
Zot O'Connor

www.ZotConsulting.com
www.WhiteKnightHackers.com


Re: [SQL] Decimal precsion?

From
Bruce Momjian
Date:
> 
> create table subzone (
>         subzid        integer,
>         subzsid       integer DEFAULT NEXTVAL ('subzone_seq'),
>         subzdescr     varchar,
>         subztaxper    decimal(0,4),
>         subzvendid    integer,
>         subzwhsid     integer,
>         subztaxship   integer
> );
> ERROR:  DECIMAL precision 0 must be beween 1 and 1000
> 
> 
> Is this documented anywhere?  By the way it should be "beTween."

Precision is the full length of the field.  Scale is the number of
digits to the right of the decimal point.

Beween -> Between change made.

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026