You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to H2 Database
Hi
can someone explain me why these two statement returns different
values ?
select convert('023',integer)
return 19
select convert('023',double)
return 23
I'm running version 1.1.115 on java 1.6.0_13
Thanks in advance
E.
Johann Schleier-Smith
unread,
Jul 14, 2009, 1:54:05 PM7/14/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to h2-da...@googlegroups.com
In the first case, the leading '0' indicates an octal representation of the number.
Thomas Mueller
unread,
Jul 17, 2009, 12:51:58 PM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to h2-da...@googlegroups.com
Hi,
I will add this to the documentation of CAST:
"When converting a text to a number, the default Java conversion
rules are used (prefixes 0x or # for hexadecimal numbers, prefix 0 for
octal numbers)."
Regards,
Thomas
Chad McHenry
unread,
Jul 17, 2009, 1:44:16 PM7/17/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to h2-da...@googlegroups.com
Is there a reason why converting to integer honors octal formatting, but converting to double does not?
Thomas Mueller
unread,
Jul 20, 2009, 2:18:10 AM7/20/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message