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     [CLOSED] Decimal Value automatically round off

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Decimal Value automatically round off
 Login/Join
 
Member
posted
SQL SQLORA
select
'PRNT' AS "ORDER_TYPE",
DECODE(nvl(0,0),0,nvl(.135,0)*1,1,nvl(.135,0)*(-1)) AS "LIMIT_PR"
FROM
DUAL

UNION ALL

select
'CHILD' AS "ORDER_TYPE",
DECODE(nvl(0,0),0,nvl(.135,0)*1,1,nvl(.135,0)*(-1)) AS "LIMIT_PR"
FROM
DUAL

UNION ALL

select
'EXEC' AS "ORDER_TYPE",
NULL AS "LIMIT_PR"
FROM
DUAL

UNION ALL

select
'PRNT-TOTAL' AS "ORDER_TYPE",
NULL AS "LIMIT_PR"
FROM
DUAL
SQL SQLORA END SESSION;

TABLE FILE SQLOUT
PRINT
*
ON TABLE PCHOLD FORMAT EXL2K
END

While i execute the code ,if i run only the PRNT and CHILD union i get the value of LIMIT_PR is .135
But when i union with EXEC and PRNT-TOTAL with NULL it gives as .14
EXEC and PRNT-TOTAL should be NULL

But I need exact result .135 without round off
Please advise.

This message has been edited. Last edited by: FP Mod Chuck,


webfocus 8105,Windows 7 Enterprise
 
Posts: 4 | Registered: October 20, 2017Report This Post
Master
posted Hide Post
First,

I don't think it a WebFocus issue.

The NULL AS "LIMIT_PR" has no format, looks like it chooses default something with two decimals.

Either fix that or...

Why not 0.000 AS "LIMIT_PR"?

And add a define to the SQLOUT

DEFINE FILE SQLOUT
   REAL_VALUE/D12.3 MISSING ON = IF ORDER_TYPE EQ 'EXEC' OR 'PRNT-TOTAL' THEN MISSING ELSE LIMIT_PR;
END


Should do the trick.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report 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     [CLOSED] Decimal Value automatically round off

Copyright © 1996-2020 Information Builders