Display Scientific Notation values in columns
Hi,
I have a column in a table that apparently displays the values in
Scientific Notation. That is, the value in each column is always
displayed as "6.4211E+15". Each value in this column should be a
unique or different value. If I type "select * from <table_name>
where <column_name> != 6.4211E+15;", I still get every row in
this table. Is there a way to display the full value of this
column so that I can view the unique value for each of these
rows? If so, how does one accomplish this?
Thank you,
Welcome to SDN.
do you mean to say that in some rows some column values will be blank and you want to replace the blanks with '-'.
loop thru the itab which you are passing to tableview and for the blank cells pass '-'.
<i>Also when the value is inserted at run time</i>
so you are having editable tableview. to update the value back to the dbtable, you have to read it in oninputprocessing and update it to dbtable .
search the forum on how to read the user entered value from the table view so that you can update the dbtable.
Regards
Raja
Similar Messages
-
Convert scientific notation value into normal number
hi,
I am importing excel(.csv) file into Oracle database, a value in excel file 8.70773E+11 is displaying in scientific notation format, i want to store it like 870772521002.i have already run this query, it gave me 871000000000.0000000000 this result.
Table Structure,
SQL> desc cdr;
Name Null? Type
INVOICENO VARCHAR2(50)
OCEANREGION NUMBER
CALLDATE DATE
CALLTIME VARCHAR2(10)
ORIGINATORNO VARCHAR2(50)
SUBSCRIBER VARCHAR2(75)
DESTNO VARCHAR2(50)
VOLUME FLOAT(50)
UNIT VARCHAR2(5)
this above Originatorno field had Number data type, but it wasnt working. -
Displaying Scientific Notation
I see a lot of people asking questions about how to prevent showing Scientific Notation. I have the opposite problem, I can't seem to show scientific notation.
In the field I'll Enter: 2.5E-5
After commit, the value show: 0
If I look in the database, it shows: 0.000027
How can I get the form to show 2.5E-5?
My Entity Attribute:
<Attribute
Name="Stock"
ColumnName="STOCK"
SQLType="NUMERIC"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
TableName="WASTE_STREAM_NUCLIDE">
<Properties>
<SchemaBasedProperties>
<DISPLAYWIDTH Value="8"/>
</SchemaBasedProperties>
</Properties>
</Attribute>
My Field on the Page:
<af:inputText value="#{bindings.Stock.inputValue}" label="#{bindings.Stock.hints.label}"
required="#{bindings.Stock.hints.mandatory}"
columns="#{bindings.Stock.hints.displayWidth}"
maximumLength="#{bindings.Stock.hints.precision}"
shortDesc="#{bindings.Stock.hints.tooltip}" id="it2">
<af:convertNumber groupingUsed="false" pattern="0.######E0"/>
</af:inputText>Good point. If everyone having problems with SQL*Plus number formatting went to the free online HTML manual, looked for "NUMBER" in the index and found
NUMBER
column definition from DESCRIBE, 12
NUMBER clause, 5.12.2
VARIABLE command, 12
NUMBER columns
changing format, 6.1.2.1, 12
default format, 6.1.2.1, 12
number formats
$, 6.1.2.2
0, 6.1.2.2
9, 6.1.2.2
comma, 6.1.2.2
setting default, 5.9.4, 5.9.4, 12, 12
NUMFORMAT clause
in LOGIN.SQL, 2.2.2.1
NUMFORMAT variable, 12, 12
NUMWIDTH variable, 12, 12
effect on NUMBER column format, 6.1.2.1, 12then we'd have nothing to do. -
Numeric value and scientific notation
Hi,
with Oracle 8 or 10, the query (via TOAD or my app : Delphi + BDE)
SELECT 0.0008 FROM DUAL returns 0.0008,
but the query
SELECT 0.00008 FROM DUAL returns 8E-5.
Is there a way to avoid this display in scientific notation, except changing all my queries ? Or to push the limit for this display one digit later ?
Maybe with an Oracle parameter ?
Thanks for your help !duplicate for thread
numeric value and scientific notation -
Key Figures being displayed in Scientific Notation
Hi GURU's,
I have created a Analysis Process Designer (MultiCube to Flat File) and everything seems to be ok in that but the output for 2 of the key figures are in scientific notation (i.e. 10 decimal places) and this needs to be fixed up immediately.
The value of the Key Figure is displayed as 1.72E04 instead of 1,7231810000000001E04
How do I go about solving this issue.
Thanks & Regards,
Praveen BattulaI think in floating point math adding 1 to 9999999999999899999999 is going to be a meaningless operation as by the time one converts 1 to a floating point of the scale & precision needed to represent 9999999999999899999999, it's going to lose any significance (ie: it's going to basically be represented as zero).
You'll need to do a search on how to deal with numbers of very high precision & scale. I don't have any code to hand. Have you done any of your own investigation on how to deal with this?
Adam -
How to prevent display in scientific notation
I want to convert a large double value to a string,
but when the value is greater than 10000000 , it will display in
scientific notation , such as 3.435E8
However, how can I convert it automatically to 343500000 because
there is an interface program which do not accept the scientific
notation format
Thanks in advancedStart here: http://java.sun.com/j2se/1.4/docs/api/java/text/NumberFormat.html
-
Display Large Float w/o Scientific Notation
I have a series of dollar amounts (from an SQL cursor) that I am summing up using a java.lang.Float. The values total correctly, but when I display the value it is displayed using Scientific Notation (4.19150150185925 E12). I need to write my total value to a file that will be exported to another application (mainframe). Therefore, the value when written to the output file must be 4191501501859.25. How do I get the value in that form, instead of the scientific notation form?
Should I be using a different type to sum my values into? The max value my total can reach is 99999999999999999.999
Thanks.No, I meant precisely what I said. If BigDecimal
does indeed have a valueOf method that accepts a
string, please notify Sun, as they will certainly
have to update the documentation -- didn't YOU
read the documentation link that you yourself
sent me?
No, of course not, I only checked that it indeed does not have any method that takes a String parameter and that the method to "add" numbers is really called "add".
By the way, a constructor that takes a String parameter does pretty much the same thing as a method that takes a String parameter and returns a new instance of the class. There is no significant difference between Float's valueOf(String) and the Float(String) constructor as far the user of the API is concerned.
(Looking up the source just for fun I see that Float.valueOf(String) and Float(String) do completely different things, and Float(String) creates a temporary extra Float object. The comment above says: "REMIND: this is inefficient". Interesting.)
Probably not, you were apparently too busy taking
a 'tude.No doubt! :-) -
Scientific notation doesn't display correctly
Hi, this is just a general question but it's about the Calculator app. The problem is with displaying answers in scientific notation. When I'm in scientific calculator mode, answers displayed on the screen only appear in scientific notation when they are larger than the number of digits that can be displayed. However, whenever I use it to calculate something in which the answer is smaller than the set precision for the number of decimal places, it always gives 0 instead of scientific notation. For example, if I type a number such as 1E19 and press =, then the answer displays correctly as 1E19. However, if I type 1/1E19, and press =, then the answer simply shows up as 0 instead of 1E-19, which is the correct answer in scientific notation. So, it seems that the scientific notation in Calculator simply does not display negative exponents in the scientific notation (I know that I can type such numbers but for some reason, it cannot display them as answers). This is very annoying because I often work with very small numbers, not just very large ones. Is there any way that I can get the scientific notation to display negative exponents when I'm working with very small numbers and when the answer is smaller than the set number of decimal places?
There are tonnes of possibilities and many websites with suggestions. I tried all sorts of these option (clear cache, clear cookies, anti-virus changes, page style options etc) with no success until eventually I accidentally changed my character encoding autodetect (firefox 6) from "off" to "universal" and everything is fine.
-
Why Number displayed in scientific notation
I have tried to add two numbers and got a result displayed in scientific notation.
Then I have used the 'decimalformat()' function and result is wrong.
How can display the correct result. Please help
Please see the code I have used
<cfset N1=1>
<cfset N2=9999999999999899999999>
<cfset RESULT = N1+ N2>
<cfoutput>
#RESULT#
<br />
#decimalformat(RESULT)#
</cfoutput>
result :
1E+022
92,233,720,368,547,760.00
Thanks in advanceI think in floating point math adding 1 to 9999999999999899999999 is going to be a meaningless operation as by the time one converts 1 to a floating point of the scale & precision needed to represent 9999999999999899999999, it's going to lose any significance (ie: it's going to basically be represented as zero).
You'll need to do a search on how to deal with numbers of very high precision & scale. I don't have any code to hand. Have you done any of your own investigation on how to deal with this?
Adam -
Numeric Values Converted to Scientific Notation
My BPEL process converts numeric values to scientific notation (eg. 12345678 is converted to 1.2345678E7). This then causes problems when I try to perform any mathematical operations on these values during an XSL transformation (output - NaN)
Is there any way I can stop this data conversion?
This occurs with BPEL 10.1.2.0.2. I'm loading the data from an Oracle 9.2 database using the DbAdapter.
I've written an XSL routine to convert these values back to the correct decimal notation, but would prefer to stop this happening rather than workaround the problem.On further investigation, this occurs for values loaded from Oracle FLOAT database type.
The XSD generated for the DbAdapter uses type xs:double for this field, but I've also tried changing this to xs:decimal & xs:float and still get the same problem. -
Float Data Value and Scientific Notation
Hello All,
SQL Server converts some of the float value into scientific notation for example 0.00001 will be stored as
1E-05.
Is there any simple method\formula\threshold to precisely tell when some particular value will be converted to scientific notation?
Also I think oracle store same value above i.e. 0.00001 as it is with float data type but not the case with SQL Server. Any reason for the same?
Thanks in Advance.
-MalkeshThanks Erland.
I got your point that internal storage as you mentioned will be 53 bit and 11 bit exponent of 2. However my question remains the same that is there any method\threshold from which we can say that after this numeric value stored data will be represented in
scientific notation or any rule of thumb? For example
drop
table #t
CREATE
TABLE #T (T1
FLOAT)
INSERT
INTO #T (T1)
SELECT 0.000001
INSERT
INTO #T (T1)
SELECT 0.00001
INSERT
INTO #T (T1)
SELECT 0.0001
INSERT
INTO #T (T1)
SELECT 0.001
INSERT
INTO #T (T1)
SELECT 0.01
INSERT
INTO #T (T1)
SELECT 0.1
INSERT
INTO #T (T1)
SELECT 1.
INSERT
INTO #T (T1)
SELECT 1.0
INSERT
INTO #T (T1)
SELECT 1.01
INSERT
INTO #T (T1)
SELECT 1.001
INSERT
INTO #T (T1)
SELECT 1.0001
INSERT
INTO #T (T1)
SELECT 1.00001
INSERT
INTO #T (T1)
SELECT 1.000001
INSERT
INTO #T (T1)
SELECT 1.0000001
INSERT
INTO #T (T1)
SELECT 1.00000001
INSERT
INTO #T (T1)
SELECT 1.000000001
INSERT
INTO #T (T1)
SELECT 1.0000000001
INSERT
INTO #T (T1)
SELECT 1.00000000001
INSERT
INTO #T (T1)
SELECT 1.000000000001
INSERT
INTO #T (T1)
SELECT 1.1
INSERT
INTO #T (T1)
SELECT 10.1
INSERT
INTO #T (T1)
SELECT 100.1
INSERT
INTO #T (T1)
SELECT 1000.1
INSERT
INTO #T (T1)
SELECT 10000.1
INSERT
INTO #T (T1)
SELECT 100000.1
INSERT
INTO #T (T1)
SELECT 1000000.1
INSERT
INTO #T (T1)
SELECT 10000000.1
INSERT
INTO #T (T1)
SELECT 100000000.1
INSERT
INTO #T (T1)
SELECT 1000000000.1
INSERT
INTO #T (T1)
SELECT 10000000000.1
INSERT
INTO #T (T1)
SELECT 100000000000.1
INSERT
INTO #T (T1)
SELECT 1000000000000.1
SELECT T1
FROM #T
Here you can see value < 0.0001 i.e. 0.00001 and 0.000001 both are in scientific notation. So which rule or formula drives this behavior that is what my question is. Sorry I am somewhat poor in mathematics fundamentals So if you can make it simple.
Thanks Again. -
hi
i am storing different values in a column like(A-RSTI1234/B-RSTUY1234)
using delimiter. now i want to display this stored value in different fields like(xfield=RSTI1234 and yfield=RSTUY1234) can any body help me in achieving this!!
thanks n regards
sunil
e-mail [email protected]How can I achieve this?
The solution should be more general for situation if many tabs are involved,....So do you expect a generalized SQL statement that handles are arbitrary number of tables with arbitrary column names?
It would be helpful if you provided DDL (CREATE TABLE ...) for tables involved.
It would be helpful if you provided DML (INSERT INTO ...) for test data.
It would be helpful if you provided expected/desired results & a detailed explanation how & why the test data gets transformed or organized. -
Remove scientific notation in report
I'm calculating a number and placing it in a comment box on a report. This works fine, but one of the numbers has decided to display in scientific notation (1.52666667e-3). The problem is that the comment box is not large enough to display the scientific notation and gives no indication of not fitting into the box. Instead I see 1.52666 with no indication of the exponent. I'd much rather see .001527 however I don't want to force a STR format with "d.dddddd" because most numbers don't need this much precision and I'd probably run into errors for numbers such as 12345 which won't fit into the comment box with forced 6 digit precision. If I can force it out of scientific precision, it'll probably be fine.
BTW: is there a certain number range where scientific notation becomes the default? If I knew this range I could then force the format with the STR function to display the way I want. e.g. IF x>-001 and x<.001 then STR(X,"d.dddd")
Either method would probably work for me.
thanks,
James
Solved!
Go to Solution.MyVar is a 2 dimensional pointer (Channel Group, Channel) to numeric channels that meet some criteria.
change box size: I had to make the box 3 times the width to display the number correctly. It shows 1.27933333333333E-03*. I'm appending the "*" to show the field is calculated instead of unadultered from the .csv. Maybe the problem isn't that the number is small, but that it's infinitely repeating. The number is calculate from the values .001919 - abs(.001919)/3
Left Justify: no difference from right justify.
Autoadj: shows 1.28E-
I'm making a column of channels on the report, that's why the comment text is being set multiple times.
Humphreyy - thanks for your ideas and help. -
Text code interpreted as scientific notation
I have an http service returning xml to populate a data grid.
The grid columns are tied to element attributes. One of these
columns is a simple text code, like a product code. When this
product code "looks like" scientific notation (e.g. "3E5"), the
grid is displaying "300000" instead of the code. Is there a way
somehow to tell the grid that this is a text field, and not a
number? How do you turn this off? I am rendering the column with a
label, but it doesn't make any difference. Thanks for any
tips.Is from trying to jam an int into float?That's exactly the cause. Here are some solutions:
- Use java.text.DecimalFormat to format the output or cast the float to an integer type when you want to print it (presicion might become a problem).
- Keep the number in an int or long all the time. This way you'll not lose any presicion.
Explanation can be found in the API docs of Float.toString():"If the argument is NaN, the result is the string "NaN".
Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude m:
If m is less than 10^-3 or not less than 10^7, then it is represented in so-called "computerized scientific notation." Let n be the unique integer such that 10n<=m<1; then let a be the mathematically exact quotient of m and 10n so that 1<a<10. The magnitude is then represented as the integer part of a, as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of a, followed by the letter 'E' (E), followed by a representation of n as a decimal integer, as produced by the method Integer.toString(int) of one argument." -
Select Query resulting in Scientific Notation
Hello all,
I am running a Select query through a batch file that extracts data from an Oracle database. Several of the fields that I am extracting from contain numbers that are up to 38 digits long. When I extract the data, it converts the numbers into scientific notation and it is important for me to have the entire field. Is there something I can change to my query that will pull the data in its entire form? This is what I'm running now:
select * FROM ML.APPT where APPTDATE >= to_date('01/1/2010','mm/dd/yyyy'
I apologize in advance if this has been answered already.
Thanks!>
When the extractor finishes, it returns the data into a flat file.
don't quite understand the TO_CHAR function. Does this function mean I need to say something like this: select "TO_CHAR('column name', 99999999999999999999999999999999999999" FROM ML.APPT where APPTDATE >= to_date('01/1/2010','mm/dd/yyyy')
>
Yes- if the tool you use to extract the data (your 'extractor') is converting the numeric data to a string then it is responsible for creating the string in the proper format. If the number is an integer that can have as many digits as you have '9's in your sample format string then that is what you need to do.
Here is how sql*plus (Oracle's tool) will display the data using default settings
SQL> select 12345678901234567890123456789012345678 no_format,
2 to_char(12345678901234567890123456789012345678, '99999999999999999999999999
999999999999') with_format
3 from dual;
NO_FORMAT WITH_FORMAT
1.2346E+37 12345678901234567890123456789012345678
SQL>
----- TOAD will display something similiar but the default uses more decimal digits in the scientific notation data
NO_FORMAT,WITH_FORMAT
1.23456789012346E37, 12345678901234567890123456789012345678You can either format the numeric data in the query using TO_CHAR or the 'extractor' can do it when it converts the data to a string.
Maybe you are looking for
-
How do I move the files from my existing iphoto library on one Mac to another?
I have bought a new iMac and want to move all the photos in iphoto to the new unit. I did hte migration option but all that seesm to do was give me access to the other unit and I did not know where to go from that point. Should I be looking to file
-
Convert data from ANSI to UTF-8 format
Hello, We have data in ANSI format (binary) which we need to convert into UTF-8 format. We are able to do it using FM's GUI_UPLOAD and GUI_DOWNLOAD but as the amount of data is huge we are planning to get the conversion done using background job. But
-
Error starting HCM 9.2 Virtual Image
I have downloaded and installed PeopleSoft HCM 9.2 (HCMDB-85307) from PUM. When I started the Virtual box to run the first time, it is not booting. The scroll goes fast and the last message I see is Kernel Panic - not syncing: fatal exception Th
-
I'm trying to find proof of the fact that I purchased Lion for one computer so that I can put it on another computer (a few months after the fact). I cannot find evidence of it on the App Store account information page. It doesn't have any 'hidden pu
-
To forum moderators, could you mark the relevant answer, this seems to be pending for a long time. Marking answer to the relevant reply will help other user to refer this post for similar issues http://social.msdn.microsoft.com/Forums/en-US/15406143