Print Thread
Cast Function
#51367 04/29/15 04:08 PM
Joined: Nov 2001
Posts: 3
Marietta, GA, USA
S
Member
OP Offline
Member
S
Joined: Nov 2001
Posts: 3
Marietta, GA, USA
I am trying to write a query like this:

select cast(0 as smallint) from dual

I am attaching a dataset to this and I need the field to be of type TIntegerField but it is always a TFloatField.

How can I force the dataset to expect an integer from a select query where I want a default value of 0?

Thanks,
Shannon



Shannon Wrege
Tennis Technologies, Inc.
shannon@tennisinformation.com
www.tennisinformation.com
Re: Cast Function
shannonwrege #51371 04/30/15 09:59 AM
Joined: Aug 1999
Posts: 22,219
Member
Offline
Member
Joined: Aug 1999
Posts: 22,219
The precision reported by Oracle for this field is 38 digits. Therefore the TOracleDataSet treats it as a TFloatField. You will need to query a field with a precision of 9 or less to enforce a TIntegerField.


Marco Kalter
Allround Automations

Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.136s Queries: 14 (0.015s) Memory: 2.4992 MB (Peak: 3.0418 MB) Data Comp: Off Server Time: 2024-05-16 05:24:53 UTC
Valid HTML 5 and Valid CSS