-
-
Notifications
You must be signed in to change notification settings - Fork 265
Open
Description
String-to-Bigint cast works well
select cast('9.223372036854775e18' as bigint) from rdb$database; -- OK
CAST
=====================
9223372036854775000
select cast('9.223372036854775e19' as bigint) from rdb$database; -- OK
CAST
=====================
Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-numeric value is out of range
But Double-to-BigInt cast changes the sign
SQL> select cast(9.223372036854775e18 as bigint) from rdb$database; - Sign error
CAST
=====================
-9223372036854775808
SQL> select cast(9.223372036854775e19 as bigint) from rdb$database; -- OK
CAST
=====================
Statement failed, SQLSTATE = 22003
arithmetic exception, numeric overflow, or string truncation
-numeric value is out of range
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels