Subject | double precision range question |
---|---|

Author | knisco99 |

Post date | 2007-11-20T13:55:13Z |

I have a Firebird 2.0 database running on Linux. I've created a table

that looks like this

create table people (

wealth double precision

)

I'm then trying to run the following insert

insert into people (wealth) values (12345678901234567890.0123456789)

I get the following error

Invalid token.

Dynamic SQL Error.

SQL error code = -104.

Token unknown - line 1, char 37.

1.

Looking through the Firebird book, the section on double precision

says that it should support values in the range -1.797e+308 to

1.797e+308 so it seems like my number in my insert statement should

fit into this criteria. Am I doing something wrong? One more strange

thing, if I reduce the number in my insert statement to a number that

has a precision of 18 then it will insert. 18 is also the limit for a

numeric/decimal field. This seems like an odd coincidence. Can anyone

provide some insight into this?

Thanks,

Scott Knight

that looks like this

create table people (

wealth double precision

)

I'm then trying to run the following insert

insert into people (wealth) values (12345678901234567890.0123456789)

I get the following error

Invalid token.

Dynamic SQL Error.

SQL error code = -104.

Token unknown - line 1, char 37.

1.

Looking through the Firebird book, the section on double precision

says that it should support values in the range -1.797e+308 to

1.797e+308 so it seems like my number in my insert statement should

fit into this criteria. Am I doing something wrong? One more strange

thing, if I reduce the number in my insert statement to a number that

has a precision of 18 then it will insert. 18 is also the limit for a

numeric/decimal field. This seems like an odd coincidence. Can anyone

provide some insight into this?

Thanks,

Scott Knight