Board index » delphi » NUMERIC data type

NUMERIC data type

I declared a user data type, say MYTYPE, as NUMERIC[15,15] .

When I try
    INSERT INTO MyTable (MyKey, MyColumn) VALUES ('A', 0.01)
a row is inserted with 0.01 in MyColumn.
But when I execute
    INSERT INTO MyTable (MyKey, MyColumn) VALUES ('B', 1.01)
a row is inserted with NULL in MyColumn.

It seems that the NUMERIC scale is understood by the serve as the *minimal*
number of fractional digits instead of as *maximal* one (as MS Books on line
specify).

Did anybody meet that phenomenon ?

Jacek

 

Re:NUMERIC data type


Sorry, I forgot to tell that I work with MS SQL Server 2000

Jacek

Quote
"Jacek Komorowski" <jkomorow...@larkconsultants.com> wrote in message

news:3ce97def_1@dnews...
Quote
> I declared a user data type, say MYTYPE, as NUMERIC[15,15] .

> When I try
>     INSERT INTO MyTable (MyKey, MyColumn) VALUES ('A', 0.01)
> a row is inserted with 0.01 in MyColumn.
> But when I execute
>     INSERT INTO MyTable (MyKey, MyColumn) VALUES ('B', 1.01)
> a row is inserted with NULL in MyColumn.

> It seems that the NUMERIC scale is understood by the serve as the
*minimal*
> number of fractional digits instead of as *maximal* one (as MS Books on
line
> specify).

> Did anybody meet that phenomenon ?

> Jacek

Other Threads