DanCJ
October 24, 2013, 7:47am
1
Hi
If I try to run the following query in the editor:
select :a from dual;
And then in the pop-up I set :a to be a number with the value of 1234567890123456789 then the data grid gives me 1234567890123460000.
I have scientific notation turned off, but when I go to re-run the query the bind variable is now set to 1.23456789012346E18.
Selecting 1234567890123456789 directly from dual without using a bind variable works fine.
Thanks
Dan
GTDG
October 24, 2013, 7:51am
2
Version of Toad? 32 or 64 bit? Running via F5 or F9?
From: DanCJ [mailto:bounce-DanCJ@toadworld.com ]
Sent: Thursday, October 24, 2013 10:48 AM
To: toadoracle@toadworld.com
Subject: [Toad for Oracle - Discussion Forum] Biind variables being truncated to 15 significant figures
Biind variables being truncated to 15 significant figures
Thread created by DanCJ
Hi
If I try to run the following query in the editor:
select :a from dual;
And then in the pop-up I set :a to be a number with the value of 1234567890123456789 then the data grid gives me 1234567890123460000.
I have scientific notation turned off, but when I go to re-run the query the bind variable is now set to 1.23456789012346E18.
Selecting 1234567890123456789 directly from dual without using a bind variable works fine.
Thanks
Dan
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.
DanCJ
October 24, 2013, 7:54am
3
Oops - Version 12.1.0.22, 64 bit and F9
I can reproduce. I think it’s using integer instead of large integer to store your value.
On 10/24/2013 10:48 AM, DanCJ wrote:
Biind variables being truncated to 15 significant figures
Thread created by DanCJ
Hi
If I try to run the following query in the editor:
select :a from dual;
And then in the pop-up I set :a to be a number with the value of 1234567890123456789 then the data grid gives me 1234567890123460000.
I have scientific notation turned off, but when I go to re-run the query the bind variable is now set to 1.23456789012346E18.
Selecting 1234567890123456789 directly from dual without using a bind variable works fine.
Thanks
Dan
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.
DanCJ
October 24, 2013, 8:09am
5
I’d assumed it was using some floating point datatype.
Technically you are right, we are using float since Oracle number can be either, but it’s not big enough to store the whole value it seems. There are other datatypes that can be used.
On 10/24/2013 11:10 AM, DanCJ wrote:
RE: Biind variables being truncated to 15 significant figures
Reply by DanCJ
I’d assumed it was using some floating point datatype.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.
Fixed for next beta.
On 10/24/2013 11:16 AM, Michael Staszewski wrote:
Re: Biind variables being truncated to 15 significant figures
Reply by Michael Staszewski
Technically you are right, we are using float since Oracle number can be either, but it’s not big enough to store the whole value it seems. There are other datatypes that can be used.
On 10/24/2013 11:10 AM, DanCJ wrote:
RE: Biind variables being truncated to 15 significant figures
Reply by DanCJ
I’d assumed it was using some floating point datatype.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.
To reply, please reply-all to this email.
Stop receiving emails on this subject.
Or
Unsubscribe from Toad for Oracle - General notifications altogether.
Toad for Oracle - Discussion Forum
Flag
this post as spam/abuse.
As a workaround, it appears you can do this:
SELECT TO_NUMBER(:a) FROM DUAL
and then make :a a varchar2 parameter instead. Obviously, that makes you responsible for ensuring that it’s a valid number.