Keyfigures :decimal vs floating
Hello,
Currently we are working with decimal key figures.But now onwards we are going to work with floating point key figures.
I want to know will there be any repercussions of it from performance point of view...??
Hi.
There will be no impact on performance as it is just the format and calculations take same time as it happens in binary format in background.
I hope it will help.
Thanks,
S
Similar Messages
-
Divide Result in decimal or float
Hi,
Here i am doing division calculation for two int values.
payroll occbeddays result
2168 2969 0
But i want the result as 0.73
How can i got this?
@temp_STATSCAL AVGPAYROLL is money datatype.
INSERT INTO @temp_STATSCAL (FACILITY,AVGPAYROLL)
SELECT r.FACILITY,
CASE WHEN s.OCCBEDDAYS >0 THEN
r.PAYROLL/s.OCCBEDDAYS
ELSE
0
END
FROM @temp_STATS s
CROSS JOIN @temp_REVENUE r WHERE r.FACILITY=s.FACILITYYou can use this code also
Select
Convert(decimal(10,2),(Convert(decimal,2168)/
Convert(decimal,2969)))
[Result] -
Is it possible to convert a float to two decimal places
Can anyone help me to convert a float to two decimal places
float f=16;
System.out.println(f);
It will print 16.0
But I want to get printed as 16.00"convert" no, as no conversion is needed, obviously. Format the output, yes. Read the API for String and its printf method.
-
Convertion Hex String to 32bits Decimal floating point??
Hi,
I would like to know how to convert hexa like: 416b0ac3 in decimal 32bits floating-point. The result of this string is suppose to be 14.690127.
So i must be able to do:
From 32-bit Hexadecimal Representation To Decimal Floating-Point
Thanks for your support
RiderMerlinRiderMerlin
You can use the typecast function to do this.
David
Message Edited by David Crawford on 09-06-2006 03:31 PM
Attachments:
Typecast to Single.jpg 6 KB -
SQLT_NUM mapping to int, float, decimal
Hi there,
I use OCI calls to get the data type of my attributes. OCI treats integer, decimal and float as SQLT_NUM type internally. I use OCCIAttrGet() to get the scale and precision of these data types. How do I classify them as int, float and decimal based on scale and precision??
Thanks,
SashiIf scale = 0 then use int (watch out for ranges though - Oracle can hold integers far greater than the int datatype can hold).
If scale > 0 then you use either float or decimal (I assume you mean double). I suppose which one you use depends on the range of values / precision required.
Adrian -
Hi,
How do I remove decimal from float (source) to unsigned integer (target) in graphical mapping?
For eg:
Source = 1500.23
Target = 150023
Reg,
ShobhitIf you want a quick way of just letting numbers to pass, use:
return a.replaceAll([^0-9], "");
in a UDF.
Regards,
Henrique. -
Error: while Selecting External table
Hi everybody,
When i Select an external table i am getting this error. The file is like this:
229|1|506460|SIGROUP |4890|100|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|12|CLIENT|INE547A01012|10:31:00|
229|1|506460|SIGROUP |4900|900|0|0|10:31:01|2007/12/17|M009|20191395001|L|B|13|CLIENT|INE547A01012|10:31:00|
229|1|500407|SWARAJENG |21400|300|0|0|10:33:28|2007/12/17|OWN|20191397001|L|B|154|OWN|INE277A01016|10:33:28|
I had created the Table like this:
SQL> CREATE TABLE TEMP_SAUDA
2 (S_A VARCHAR2(20),
3 S_TYPE VARCHAR2(20),
4 S_CO VARCHAR2(20),
5 S_CONAME VARCHAR2(40),
6 S_RATE NUMBER,
7 S_QTY NUMBER,
8 S_G NUMBER,
9 S_H NUMBER,
10 S_TIME TIMESTAMP WITH TIME ZONE,
11 S_DATE DATE,
12 S_PCODE VARCHAR2(20),
13 S_SETNO VARCHAR2(20),
14 S_M VARCHAR2(20),
15 S_N VARCHAR2(20),
16 S_O VARCHAR2(20),
17 S_CLIENTOWN VARCHAR2(10),
18 S_ISIN VARCHAR2(12),
19 S_ORDER_TIME TIMESTAMP WITH TIME ZONE
20 )
21 ORGANIZATION EXTERNAL
22 (TYPE oracle_loader
23 DEFAULT DIRECTORY BSE17122007
24 ACCESS PARAMETERS
25 (RECORDS DELIMITED BY NEWLINE
26 FIELDS
27 (
28 S_A CHAR(20),
29 S_TYPE CHAR(20),
30 S_CO CHAR(20),
31 S_CONAME CHAR(20),
32 S_RATE CHAR(20),
33 S_QTY CHAR(20),
34 S_G CHAR(20),
35 S_H CHAR(20),
36 S_TIME CHAR(35) date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM
37 S_DATE CHAR(22) date_format DATE mask "mm/dd/yyyy hh:mi:ss ",
38 S_PCODE CHAR(20),
39 S_SETNO CHAR(20),
40 S_M CHAR(20),
41 S_N CHAR(20),
42 S_O CHAR(20),
43 S_CLIENTOWN CHAR(20),
44 S_ISIN CHAR(20),
45 S_ORDER_TIME date_format TIMESTAMP WITH TIMEZONE mask "DD-MON-RR HH.MI.SSXFF AM TZH:TZM"
46 )
47 )
48 location (BSE17122007:'BR171207.DAT')
49 )
50 ;
Table created.
SQL> SELECT * FROM TEMP_SAUDA;
SELECT * FROM TEMP_SAUDA
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "date_format": expecting one of: "binary_double,
binary_float, comma, char, date, defaultif, decimal, double, float, integer, (,
nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned,
varrawc, varchar, varraw, varcharc, zoned"
KUP-01007: at line 21 column 14
ORA-06512: at "SYS.ORACLE_LOADER", line 19
Is there any mistake in this table creation.
what i have to declare to the time format if the format in the file id hh:mm:ss
Thank u...!
RaviThe output you posted is completely wrong, I could not even create the table without errors.
Try with this.
CREATE TABLE TEMP_SAUDA
(S_A VARCHAR2(20),
S_TYPE VARCHAR2(20),
S_CO VARCHAR2(20),
S_CONAME VARCHAR2(40),
S_RATE NUMBER,
S_QTY NUMBER,
S_G NUMBER,
S_H NUMBER,
S_TIME TIMESTAMP WITH TIME ZONE,
S_DATE DATE,
S_PCODE VARCHAR2(20),
S_SETNO VARCHAR2(20),
S_M VARCHAR2(20),
S_N VARCHAR2(20),
S_O VARCHAR2(20),
S_CLIENTOWN VARCHAR2(10),
S_ISIN VARCHAR2(12),
S_ORDER_TIME TIMESTAMP WITH TIME ZONE
ORGANIZATION EXTERNAL
(TYPE oracle_loader
DEFAULT DIRECTORY BSE17122007
ACCESS PARAMETERS
(RECORDS DELIMITED BY NEWLINE
FIELDS terminated by "|"
S_A CHAR(20),
S_TYPE CHAR(20),
S_CO CHAR(20),
S_CONAME CHAR(20),
S_RATE CHAR(20),
S_QTY CHAR(20),
S_G CHAR(20),
S_H CHAR(20),
S_TIME CHAR(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM",
S_DATE CHAR(10) date_format DATE mask "yyyy/mm/dd",
S_PCODE CHAR(20),
S_SETNO CHAR(20),
S_M CHAR(20),
S_N CHAR(20),
S_O CHAR(20),
S_CLIENTOWN CHAR(20),
S_ISIN CHAR(20),
S_ORDER_TIME char(8) date_format TIMESTAMP WITH TIMEZONE mask "HH.MI.SSXFF AM TZH:TZM"
location (BSE17122007:'BR171207.DAT')
;With this you get:
SQL> col s_time format a40
SQL> col s_date format a40
SQL> col s_order_time format a40
SQL> r
1* select s_time,s_date,s_order_time from temp_sauda
S_TIME S_DATE S_ORDER_TIME
01-JAN-08 10.31.01.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.31.01.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.31.00.000000 AM +00:00
01-JAN-08 10.33.28.000000 AM +00:00 17.DEC.2007 00:00:00 01-JAN-08 10.33.28.000000 AM +00:00Be aware that your file does not contain date information for the time fields, so as you see above it is defaulted to 01-JAN-08 for the S_TIME and S_ORDER_TIME column. -
Unit of measure EA allows transactions in decimals ? Is EA indivisible?
Unit of measure EA allows transactions in decimals ? Is EA indivisible?
There are two scenarios. While creating a Bill of material - based on the configuration (see below) if you enter a quantity with decimals for a part number for which the Basic UOM is EA the system displays a message "Unit of measure EA does not support decimal places" THIS IS GOOD AS EXPECTED
While transacting using MB1B, MB1C, MB1A, MFBF, MIGO or other transactions the system DOES NOT check and it is currently allowing us to post with decimals (1.25, 1.312) for part number for which the unit of measure is EA.
Was not EA supposed to be an indivisible unit of measure? why is the warning message getting activated while creating or changing a BOM and why not while transacting stock?
We have configured EA in the CUNI transaction as follows:
Int. meas. unit EA
Commercial EA each
Technical EA each
Decimal places
float. point exp.
ISO code EA
Primary code
Numerator 1
Denominator 1
Exponent 0
Additive constant 0.000000 X Commercial meas.unit
Decimal pl. rounding Value-based commt
Unit of meas.familyyou cannot restrict this behaviour with CUNI customizing, you can only check and stop this in a user exit.
SAP inventory managment allows and stores 3 decimals for any unit of measure. You can only define how it will show the value to the users and how it will round the decimals if it calculates the conversion. But if you enter manually with decimals, then SAP will not round this.
please read OSS Note 931971 - Decimal places in stocks and stock postings
and
Note 77525 - Quantity unit conversion in inventory management -
Error when i fetch the external table in oracle 9i ?
External table is created.
But, when i select the external table , it is thrwing the following error.
I have given READ and WRITE permission to the oracle directory.
And, i having the flat file with comma delimited data.
SQL> create table mohan_ext (
2 EMPNO NUMBER(5) ,
3 JOB VARCHAR2(15),
4 SALARY NUMBER(8,2),
5 MGR NUMBER(5) ,
6 HIREDATE DATE,
7 DEPTNO NUMBER(5)
8 )
9 organization external
10 (type oracle_loader
11 default directory ext_dir
12 access parameters (records delimited by newline
13 fields terminated by ','
14 missing field values are null
15 (
16 EMPNO NUMBER(5:5) ,
17 JOB VARCHAR2(15:15),
18 SALARY NUMBER(8,2:8,2),
19 MGR NUMBER(5:5) ,
20 HIREDATE DATE,
21 DEPTNO NUMBER(5:5)
22 )
23 )
24 LOCATION('flat.txt'));
Table created.
SQL> select * from mohan_ext;
select * from mohan_ext
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "comma, char, date, defaultif,
decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ),
unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: NUMBER
KUP-01007: at line 5 column 11
ORA-06512: at "SYS.ORACLE_LOADER", line 14
ORA-06512: at line 1
SQL>You may need to scrub some of the data prior to using it as an external table. For instance, ensure that you do not have any extra commas lingering around somewhere within the data as this could cause mapping issues with the data. I've used this process hundreds of times, and more often than not there is an extra comma somewhere that is causing the issue.
-
Problem with external tables in 9i
Okay I have copied the csv file to that directory. I get this error when I run the select statement... basically the fields dont get populated.
*** SCRIPT START : Session:ADMAP@DEVDB2(1) 13-Nov-2006 16:38:53 ***
Processing ...
select * from proc_args
select * from proc_args
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: VARCHAR2
KUP-01007: at line 5 column 26
ORA-06512: at "SYS.ORACLE_LOADER", line 14
*** Script stopped due to error ***
*** SCRIPT END : Session:ADMAP@DEVDB2(1) 13-Nov-2006 16:38:53 ***
SCRIPTCREATE OR REPLACE DIRECTORY dir AS '/tmp/ext_dir';
--grant read,write on directory ext_dir to bulk_load;
CREATE TABLE proc_args (
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
ORGANIZATION EXTERNAL (
-- TYPE ORACLE_LOADER
DEFAULT DIRECTORY dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
LOCATION ('input_arguments.csv')
--PARALLEL 5
--REJECT LIMIT UNLIMITED;
select * from proc_argsI think the fields specified in the ACCESS PARAMETERS section should be SQL*Loader datatypes, not standard SQL, e.g.
CREATE TABLE proc_args (
argument_name VARCHAR2(50),
argument_value VARCHAR2(50)
ORGANIZATION EXTERNAL (
-- TYPE ORACLE_LOADER
DEFAULT DIRECTORY dir
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
argument_name CHAR,
argument_value CHAR
LOCATION ('input_arguments.csv')
Other valid types are specified here:
http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/ldr_field_list.htm#sthref1004 -
How do you determine a column's data type?
Let's say I have a DB Table out there and I have NO WAY of knowing that column 1 is a CHAR, column 2 is a SMALLINT or whatever. I can write sql to select * from table and see everything, but how do I know what each column's data type is?
I found it. Thanks, and for any other people who need the solution, here is what I found on another thread:
int type; try { type = i_metaData.getColumnType(column+1); } catch (SQLException e) { return super.getColumnClass(column); } switch(type) { case Types.CHAR: case Types.VARCHAR: case Types.LONGVARCHAR: return String.class; case Types.BIT: return Boolean.class; case Types.TINYINT: case Types.SMALLINT: case Types.INTEGER: return Integer.class; case Types.BIGINT: return Long.class; case Types.FLOAT: case Types.DOUBLE: return Double.class; case Types.DATE: return java.sql.Date.class; case Types.TIMESTAMP: //Date Time return java.sql.Date.class; case Types.DECIMAL: // Currency,Decimal return Float.class; default: return Object.class; } } -
Error setting the selected item in a dropdown component in a BPM
Hi,
The first step in the process is a human step where it's possible to select country in a dropdown box. The second step is also a human step where I try to display the same context that was selected in the first step.
I use the "merge" operation in the mapping, but the item that I select in the first step in the process is not selected in the second step in the process.
Does anyone know how to solve this?
Best Regards
MichaelHi Michael,
Only simlple types are supported in WD for EHP1 (Binary, boolean, byte, date, decimal, double, float, integer, long, short, string, time, timestamp)
No further Dictionary Types supported
(for example: currency)
Best Regards,
Karthik
Edited by: Karthik S J on Oct 15, 2008 2:34 PM -
How to extract the cobol files into owb
Hi
How to extract the cobol files in owb,I am using OWB9.2.
Ex:I am having 2 records DCEC4000100 9159000050C those values are 5 bytes 'RAVI and 6 bytes '15000'.
Using contorl file i am trying to load these into Oracle,But i am not able into insert these records into Oracle.
Can any tell me how to handle this kind of situation?
Regards,
RupakGood morning Ashok,
Your data is in a SQL*Loader supported datatype, so basically it should not be a problem.
Have you checked the Database Utilities guide (for Oracle9i for instance: http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96652/toc.htm) on how to handle this?
I'll also repeat my previous question, have you ever been able to load data into the database using SQL*Loader (either using ASCII values or any other datatype)?
For the OWB part, have you read "Importing Data Definitions" (typically chapter 4)? More specifically, "Specifying Field Properties" in "About Flat File Sources and Targets"?
In "SQL*Loader Properties" it says the following:
Type Describes the data type of the field for the SQL*Loader. You can use the Flat
File Sample Wizard to import the following data types: CHAR, DATE, DECIMAL
EXTERNAL, FLOAT EXTERNAL, INTEGER EXTERNAL, ZONED , AND ZONED
EXTERNAL. For complete information on SQL*Loader field and data types, refer to
Oracle9i Utilities. Currently, only portable datatypes are supported.
If you check the database utitlities guide (chapter 6 Field List Reference) and look for "SQL*Loader Datatypes", you'll find (packed) decimal under the Nonportable Datatypes. This implies that OWB does not support it.
This does not mean you can't use SQL*Loader, you'll only have to define everything separate from OWB and call it separately as well.
Good luck, Patrick -
SQLERRM: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
SQLERRM: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "minussign": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01007: at line 8 column 4
Here is my script
CREATE OR REPLACE DIRECTORY NO_STOCK_log_dir
AS 'c:\starpubs\starpubs\dataformats\logs\NO_STOCK\log';
CREATE OR REPLACE DIRECTORY NO_STOCK_bad_dir
AS 'c:\starpubs\starpubs\dataformats\logs\NO_STOCK\bad';
create table ext_NO_STOCK_table (
ACCT varchar(5),
SUBACCOUNT char(1),
ITEM_NO varchar(6),
PROCESS_DATE varchar(6),
ORDER_QTY integer
organization external
type oracle_loader
default directory user_dir
access parameters
records delimited by newline
badfile NO_STOCK_bad_dir:'NO_STOCK%a_%p.bad'
logfile NO_STOCK_log_dir:'NO_STOCK%a_%p.log'
fields
MISSING FIELD VALUES ARE NULL
ACCT (1:5) char(5),
SUBACCOUNT (6:6) char(1),
ITEM_NO (21:26) char(6),
PROCESS_DATE (30:35) char(6),
ORDER_QTY (37:41) integer external
location('NOSTOCK')
reject limit unlimited;
NOSTOCK data file is:
E2247 477265 110120 00001a minus qualifies as a special character and can not be used in identifiers unless you embed the identifier in double quotes.
Error messages are documented. You could and should have looked this up yourself.
Your question is redundant and a violation of Forums Etiquette.
Sybrand Bakker
Senior Oracle DBA -
Calling functions in External tables
I'm trying to create an External table and assigning a function return value to a column. But I'm getting error when trying to retrieve data from the table. Below are the scripts and error message. Can someone point me the correction.
create or replace
function v_sum ( v_num1 number, v_num2 number) return number as
v_res number;
begin
v_res := v_num1 + v_num2;
return v_res;
end;
create table tab_xyz
col1 varchar2(10),
col2 varchar2(10),
col3 number
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER DEFAULT DIRECTORY "MF_DIR" ACCESS PARAMETERS (
records delimited BY newline
load when (col1 != blanks)
badfile mf_dir:'xyz.csv.bad'
logfile mf_dir:'xzy.csv.log'
discardfile mf_dir:'xyz.csv.dsc'
fields terminated BY ',' optionally enclosed BY '"' MISSING FIELD VALUES ARE NULL
(col1,
col2,
col3 v_sum(3,4))
LOCATION ('xyz.csv' ))
REJECT LIMIT 100;
Error starting at line 4 in command:
select * from tab_xyz
Error report:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
ORA-29400: data cartridge error
KUP-00554: error encountered while parsing access parameters
KUP-01005: syntax error: found "identifier": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: v_sum
KUP-01007: at line 9 column 11
29913. 00000 - "error in executing %s callout"
*Cause: The execution of the specified callout caused an error.
*Action: Examine the error messages take appropriate action.Thanksfields terminated BY ',' optionally enclosed BY '"' MISSING FIELD VALUES ARE NULL
(col1,
col2,
col3 EXPRESSION "v_sum(3,4)")
LOCATION ('xyz.csv' ))
REJECT LIMIT 100;
KUP-01005: syntax error: found "identifier": expecting one of: "binary_double, binary_float, comma, char, date, defaultif, decimal, double, float, integer, (, nullif, oracle_date, oracle_number, position, raw, recnum, ), unsigned, varrawc, varchar, varraw, varcharc, zoned"
KUP-01008: the bad identifier was: EXPRESSION
Maybe you are looking for
-
Open Office File Conversion Trick
I have several NeoOffice files that have the odt extension. I really wanted to have access to them on my iPad without having to convert every single file. Here is a simple solution that has been working for me. I could also have uploaded them all to
-
E72 Adobe Reader LE 2.5 cannot reflow PDF
Hi, I would like to use the reflow (text wrap) function in Adobe Reader LE 2.5 so that it will be easier for me to use my E72 as a ereader. Does anyone know how I can reflow PDF using Adobe Reader LE 2.5? I've tried using different PDFs with and wi
-
Duplicate file names w/ ._
hey all, when i transfer files, like a jpeg for example, from my mac to a pc, i notice that the pc shows two files w/ the same name. the difference is that one file has a ._ in front of it: ex: (._ filename.jpg) & (filename.jpg) what is the ._ ? is t
-
A bug! -1120 Ref count for this object is higher then 0
Hello experts! the following code makes an error -1120 Ref count for this object is higher then 0 but the next code doesn't ... who is attentively enough, can find the difference. (is commened out) please fix the bug. static class Program sta
-
Problem to reinstall Adobe suite on mac ?
after a did a clean install in mac book pro I am not able to reinstall the creative suite in my mac. I tried to install it from the cd I had bought it but it says "the seri a number you entered is valid, but a qualifying product cannot be found on th