Hi all, We have currency column with data type (number) in Dbase. When I pull the data from the dbase value is showing with 4 decimals (e.g 0.16754). But when I am trying to pull the data from Web focus environment as below, it showing the data with two decimals. ENGINE SQLORA SET DEFAULT_CONNECTION &SEL_DSN ENGINE SQLORA SELECT CURRENCY FROM CUR_TABLE; TABLE FILE SQLOUT PRINT * END -EXIT I need to show the data till 4 deciamls. Could you please suggest, how can i do this? Thanks, RaghuThis message has been edited. Last edited by: Kerry,
WebFOCUS 7.6.7 Windows Excel, PDF, HTML
September 19, 2011, 05:29 PM
Waz
What is the format of the column in Oracle ?
If you add ?FF after TABLE FILE SQLOUT, what is shown ?
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 20, 2011, 03:03 AM
raghuram
Hi Waz, Thanks for your response. Format of the column in Oracle is Number, After adding ?FF in TABLE FILE SQLOUT,It is showing D20.2
Thanks, Raghu
WebFOCUS 7.6.7 Windows Excel, PDF, HTML
September 20, 2011, 04:27 PM
Waz
I think WebFOCUS is getting confused with the format, are you able to force the format to what you want in the SQL, then it should come through OK.
Waz...
Prod:
WebFOCUS 7.6.10/8.1.04
Upgrade:
WebFOCUS 8.2.07
OS:
Linux
Outputs:
HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!
September 20, 2011, 05:55 PM
Dan Satchell
I believe the standard WebFOCUS conversion for a plain number field in Oracle is D20.2. I think you will need to define your Oracle currency column as something like number(9,4) in order for WebFOCUS to assign more decimals to the converted column.
WebFOCUS 7.7.05
September 23, 2011, 03:46 PM
raghuram
Hi Waz, i tried to force the data type to D20.6 but it is showing the same as .1300 instead of .1345
WebFOCUS 7.6.7 Windows Excel, PDF, HTML
September 23, 2011, 04:14 PM
Tom Flynn
ENGINE SQLORA SET DEFAULT_CONNECTION &SEL_DSN ENGINE SQLORA SELECT TO_CHAR(CURRENCY,'$999,999,999,999,999.9999') "Currency" FROM CUR_TABLE ;
If we HOLD the results from the script above we can see that WF now sees the data retrieved as P18.6 instead of the default D20.2, therefore keeping the precision closer to what you need:
0DEFINITION OF HOLD FILE: HDATA
0FIELDNAME ALIAS FORMAT
NUM E01 P18.6 MISSING = ON
I had this issue last week. Went to Adapter Administration for UNIX, Windows, OpenVMS, i5/OS, and z/OS (DN4501040.1110). On page 1669 is the Oracle section How to Override the Default Precision and Scale. Based on this, I tried:
ENGINE SQLORA SET CONVERSION FLOAT PRECISION 24 8
This produced the desired precision.
WebFOCUS 8.2.06
September 26, 2011, 08:39 AM
jgelona
I'm not sure why WebFOCUS allows D20 when the documentation says that D format allows for 15 significant digits. Packed fields (P format) allows 31 digits. Maybe an IBI person can answer that.
In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.