Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Float returned instead of integer

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Float returned instead of integer
 Login/Join
 
Member
posted
I have a fex that I am using as a wrappper around some sql queries. In my fex I have it do a PRINT * so that it can be as generic as possible.

When I run my query in SQL PLUS it brings back the results from my Oracle database as Integers. When I run the query by calling it from the fex, it comes back and displays as floating. Why is this happening and how do I get it to stop? I do not want to have to specify each field manually and then change the type to I.


ENGINE SQLORA SET DEFAULT_CONNECTION &CONNECTION
SQL SQLORA PREPARE SQLOUT FOR
-INCLUDE &TEST
;
END



TABLE FILE SQLOUT
PRINT *


HEADING
&HEADLINE1
&HEADLINE2
FOOTING
&FOOTLINE1
&FOOTLINE2

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *


7.7.02/AIX/Excel, PDF, HTML
 
Posts: 5 | Registered: December 09, 2008Report This Post
Master
posted Hide Post
wf looks at number attribute only of Oracle column and does not regard digits and precision chosing an overall default type of D20.2 which can be varied by various means but not adjusted so it takes account of the precision on individual fields.

This from the manual

Considerations for the NUMBER Data Type
When working with the NUMBER data type, where the precision is between 32 and 37, by
default the NUMBER data type is mapped to the server data type double float (D), with a
precision of 20 and a scale of 2.
When working with the NUMBER data type, where the precision is 38, by default the
NUMBER data type is mapped to the server data type Integer (I), with a display length of
11.
To override the precision of the NUMBER data type, where the precision is between 32 and
38, use the ORANUMBER setting.


Syntax: How to Set ORANUMBER
ENGINE [SQLORA] SET ORANUMBER {COMPAT|DECIMAL}
where:
SQLORA
Indicates the Adapter for Oracle. You can omit this value if you previously issued the
SET SQLENGINE command.
COMPAT
Indicates that the NUMBER data type will be mapped to the server data type double
float (D), with a precision of 20 and a scale of 2. COMPAT is the default value.
DECIMAL
Indicates that the NUMBER data type will be mapped to the server data type decimal
(P), with a precision of 33.


The only way round this is to create a master.

Ironically there are ways to alter the less frequently used integer, float and double oracle types!


Example: Setting the Precision and Scale Attributes
The following example shows how to set the precision attribute for all INTEGER fields to 7:
ENGINE SQLORA SET CONVERSION INTEGER PRECISION 7
The following example shows how to set the precision attribute for all DOUBLE PRECISION
fields to 14 and the scale attribute to 3:
ENGINE SQLORA SET CONVERSION FLOAT PRECISION 14 3
The following example shows how to set the precision attribute for all INTEGER fields to
the default:
ENGINE SQLORA SET CONVERSION INTEGER RESET
The following example shows how to set the precision and scale attributes for all fields to
the defaults:
ENGINE SQLORA SET CONVERSION RESET



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Float returned instead of integer

Copyright © 1996-2020 Information Builders