Scientific Notation conversion to text Help needed

I have a column with datatype nvarchar. I need to remove this problem thats happenning often, This is how sometimes the values can be 13343E11466  in my column  but when I run a query it changes to " 1.40E+279".. Do i need to convert
the data type into text? or
Can someone help me out ??
FM

> 13343E11466 
That is not a common number. How do you interpret the string?
If you want to keep it in a specific display format, you have to keep it as a string. SSMS reformats to a standard scientific display format. The actually value does not change.
DECLARE @Fl float = 13343E11;
SELECT @Fl;
-- 1.3343E+15
Excel does the same thing. This behavior is similar to datetime with a single internal binary representation and many string formats.
Kalman Toth Database & OLAP Architect
SELECT Video Tutorials 4 Hours
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

Similar Messages

  • Preventing automatic scientific notation conversion for excel o/p of bi pub

    I have a column in a query that contains a mixture of numbers and letters and hyphens. If the only letter is E, then I get scientific notation instead of the actual text,when I run the report for excel output and open it in excel.
    For example:
    185701E-02 becomes 1.86E+03 in the excel output of the report
    4962E6 becomes 4.96E+09
    will be really grateful if anyone can help

    See this thread:
    Re: Long account Numbers displayed in exponential form in excel using XML Pub
    Regards,
    Dave

  • Preventing automatic scientific notation conversion for excel output?

    I have a column in a report that contains a mixture of numbers and letters and hyphens. If the only letter is E, then I get scientific notation instead of the actual text when I run the report for excel output and open it in excel.
    For example:
    185701E-02 becomes 1.86E+03
    4962E6 becomes 4.96E+09
    Any ideas how to fix or work around this in the template, data definition, or excel config?
    Thanks,
    Kevin

    I tried pre-pending an apostrophe in the SQL and in the rtf template to indicate to excel that it is a text field, but this just resulted (not surprisingly) in '185701E-02 instead of 185701E-02

  • Text help Needed!

    Hi there, I have an issue hopefully someone here can help me with- I'm working with a cousin on a Flash project, changing a few graphics. Now, I'm using Flash CS4 on a Mac, and a font used in the original file, ''Micra'' is not on my system. I used the Font Mapping function to change the font, but I still see no text when I scroll through the movie in Flash, or when it is now published. Is there anything I can do to make the text visible? What am I missing? Do I need my cousin to do anything for me? I've searched around but haven't found a solution otherwise. If it helps, I had an issue with another graphic that needed to be deleted; I couldn't see it at all and could only get rid of it by deleting it from the library. Maybe that was also due to this font issue. And to add, the movie looks somewhat different when I view it in Flash; there are other graphics that pnly show when the file is published, and I get compiler errors relating to syntax. I'm not too experienced with Flash, so I have no idea how to identify the issue.  Much thanks for any help.

    Post script- My cousin has no access to any resources I might need, and I tried installing ''Micra Normal'' on my computer. Nothing that's been made invisible so far has become visible. I can imagine a myriad of technical reasons why the text might not be showing up, still hoping someone here might have an answer. The way the text works in the Flash, there are buttons to click through the text. The text fades in with each frame. Within Flash itself I cannot see this action happening, I have no clue why. The font in the original Flash doesn't even seem to look like 'Micra', from what I can tell. My cousin sent me a packet that included a .txt file with all the text that's supposed to go into the Flash, with html code included. Dunno if there's a way I should utilize this in Flash.

  • Fade Out Text Help Needed

    First flash project. All looks great in preview. I've created
    a text fade out by converting the white text to a movie clip
    symbol. In one keyframe the text is alpha 100%. Several frames
    later I've created another keyframe with alpha set to 0%. I've
    added a motion tween between the 2 keyframes.
    The SWF looks good when I pan it on the timeline, however,
    when I test it or publish it. The text just stays alpha 100%.
    Your assistance is appreciated.
    Kristi

    windowswarrior wrote:
    > First flash project. All looks great in preview. I've
    created a text fade out
    > by converting the white text to a movie clip symbol. In
    one keyframe the text
    > is alpha 100%. Several frames later I've created another
    keyframe with alpha
    > set to 0%. I've added a motion tween between the 2
    keyframes.
    >
    > The SWF looks good when I pan it on the timeline,
    however, when I test it or
    > publish it. The text just stays alpha 100%.
    >
    > Your assistance is appreciated.
    > Kristi
    >
    First let me just point out that if text is not Alpha at all,
    you don't need to set
    it to 100%, you just set the side where the 0% is, or
    whatever number lower than 100%.
    100% means no alpha so it's not required to specify that at
    all.
    Secondly, my guess is that you set the text to DYNAMIC not
    STATIC. Dynamic text can
    fade in authoring but will fail upon export. In fact try to
    Export Preview movie all
    the time, this is the only reliable method to find out
    whether it's all functioning
    properly. Preview while authoring it's never reliable.
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Oracle Text  - Help needed

    Hi,
    I am using Oracle Text 9.2 on Oracle databas version 9.2. I want to search for two words, which should be next to each other. For ex.
    select col1, col2
    from tab1
    where contains (col2, 'personal computer') > 0;
    I don't want those rows, which have personal in one place and computer in another place. But above query giving all these rows. Please let me know.
    Thanks a lot for the help.

    I want to search for two words, which should be next to each otherhere we go:
    SQL> create table t as select 'my personal computer' col1 from dual union all
                      select 'personal' col1 from dual union all
                      select 'computer' col1 from dual union all
                      select 'personal pc computer' col1 from dual
    Table created.
    SQL> create index t_idx on t (col1) indextype is ctxsys.context
    Index created.
    SQL> select * from t where contains(col1, '{personal computer}') > 0
    COL1               
    my personal computer
    1 row selected.

  • Custom text - help needed

    Hi Guys, I've got to design a Family Tree for a client and they want a very particular style. An arc sits at the bottom centre of the page, and inside the arc there are two names/birthdays/deaths/marriages etc. At right angles outside the arc, more names/births/deaths/marriages are listed. For each new generation there will be a new arc, and each new name etc will be at right angles to the arc below, no matter where they sit on the arc. I've done a really rough example of what they want.
    So basically my question is this: can it be done easily? (typing on text paths, scripts etc etc..)  I really don't want to have to put each new name into an individual text box and rotate to the correct angle, if I can help it. There are up to 8 generations and several hundred names. Family tree goes back to early 1800's...
    Any help would be greatly appreciated!

    It looks like a great opportunity to write a script. After all, it's all just maths; the names 'above' the root can evenly be distributed by dividing the available arc (180°) by the number of names (3), resulting in a separation of 60°, and the initial angle should be half that of that separation. So the first name is at 30°, the second at 90°, the third at 150°, and then there is a remainder of 30° again for the right side.
    These same values should be used for the next layer of this onion (family trees can be smelly too), but this time I think the content should be centered on that angle, so the angle for each single line depends on the number of lines in that branch.
    It sounds perfectly doable with a script, apart for one thing: how are you going to point out what texts must go where?

  • No scientific notation in csv file

    Hi, All
    I have a package is extracting data from DB to CSV file.
    And I made up a column like '48484848484848484', when I load this column into CSV file,
    it shows me scientific notation along with the data.
    How can I get rid of the scientific notation ?
    I've tried data conversion, derived column. Nothing works.
    This really makes my frustrated.
    Thank you in advance.

    Hi,
    In that case, the SQL export process is fine.
    It's just Excel suggesting a scientific notation where it's not needed.
    You can get rid of the scientific notation by forcing your "long" numeric value into a string.
    For example
    "A001","Item code", "123376265892759026"
    instead of
    "A001", "Item code", 123376265892759026
    Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu
    My data souce is like:
    Select '1234567891123' as column1,
              Id  as column2,
                          Name as column3,
    From Table1
    I think I already give column1 as a string. And I also tried to cast column1 to nvarchar or varchar or decimal or numeric, nothing works.

  • Converting from a double to scientific notation

    does anyone know how I can convert a double value to scientific notation?

    java.text.DecimalFormat can do that.

  • 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."

  • TS1627 Please Help. I received 4 emails from 1 person with the same message heading. The emails were automatically grouped by Mail. I replied to the latest mail in the conversation. Once sent the other messages in the conversation disappeared. I NEED THEM

    Please Help. I received 4 emails from 1 person with the same message heading. The emails were automatically grouped Apple Mail. I replied to the latest mail in the conversation. Once sent the other messages in the conversation disappeared. I NEED THEM BACK! They all had very important attachments. I have tried looking for them in deleted items, even though I didn't throw any of them away, still cant find them. Never had this problem before. I'm pretty sure its a setting somewhere. Also tried expanding all conversations, no luck. Searching for the mails under the sent email address, no luck.
    I'm sure they are not deleted but have somehow been hidden by Mail. Very frustrating.
    Thanks in advance for any help.
    Kash.

    I have found found out what has happened. I had requested a statement dating back to April 2012 from a supplier. They replied back with the latest statementof 2013 only but used the same subject heading as the previous monthly statements. Apple Mail automatically grouped these and I thought that they were sent altogether. As soon as I replied to the last email all other the previous emails ungrouped from the conversation leaving me lost as to where they had gone. They were all still sitting in my inbox but no longer part of the trcked conversation. I searched under the subject heading and all individual mails were all still there. (feeling stupid - )

  • Need to "turn off" (disable) scientific notation

    How can I prevent real (floating point - whatever) numbers from displaying (within a table) in scientific notation. Appears to be for numbers > 9999999.. The number 27000000 is displayed as 2.7E7
    Thanks

    Drop the Number Converter on the component and specify the number of pre and post decimal digits.
    See http://developers.sun.com/jscreator/learning/tutorials/2/converters.html

  • 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.

  • DecimalFormat issues/Scientific notation

    I have 2 issues with formatting numbers with scientific notation via the DecimalFormat class
    ISSUE 1: Disregard of the number of MAXIMUM FRACTOINAL DIGITS
         in the code:
                                     NumberFormat nf = NumberFormat.getInstance();
                                    DecimalFormat df = (DecimalFormat)nf;
                                    df.applyPattern("#00.#E0");
                                    System.out.println( df.format(12345678)); 
                                       it printed: 12.35E6
         Why does it violate my request for one significant digit beyond the decimal
         point?. (Note, this problem
    only seems to occur when when the sum of MAX integer and Max fractional
    digits in my pattern is 4)
    ISSUE 2:
    Number of significant digits displayed:- I really just need a sanity check on this one
    The 1.4.2 API for DecimalFormat states
    ?     The number of significant digits in the mantissa is the sum of the minimum integer and
    maximum fraction digits, and is unaffected by the maximum integer digits. For example,
    12345 formatted with "##0.##E0" is "12.3E3". To show all digits, set the significant digits
    count to zero. The number of significant digits does not affect parsing.
    I tried this ? it displays 123.45E3, or 5 significant digits? Looks like the number of significant digits
    is MAX integer + MAX fractional digits in a pattern. Am I correct (and the API not correct)?
    thanks
    carol

    Thanks. I'm assuming you're responding to issue #1. I did try it, and it worked, as expected. I never seem to have an issue when all symbols
    preceding the decimal are 0. My issue, I suppose, is the inconsistency of how the formatting
    works, when it comes to the number of fractional digit positions. Most of the times it 'behaves' and
    only prints out the number of digits you ask, but sometimes it does not.
    I've tested quite a few combinations. I'm attaching the code (in case you need help sleeping tonight).
    The only 'pattern' I've noticed is that this issue only occurs when the total number of digits specified
    in the pattern (before and after decimal) is 4. (exception ... if all digits specified before the decimal
    are 0s, this never occurs)
    I know a simple solution ... make sure I never have
    a total of 4 #s and 0s in my pattern. But again, my question is why ... and/or ... does this type of
    inconsistency crop up elsewhere.
    import java.util.*;
    import java.text.*;
    public class x {
         public static void main(String [] args) {
              NumberFormat nf = NumberFormat.getInstance();
              DecimalFormat df = (DecimalFormat)nf;
              // these 3 work like I'd expect: 3 digits to the left, one to the right w/ rounding
              // signif digits = max int digits + max fractional digits
              df.applyPattern("000.#E0");
              System.out.println( df.format(12345678)); // 123.5E5
              df.applyPattern("00.#E0");
              System.out.println( df.format(12345678)); // 12.3E6
              df.applyPattern("0.#E0");
              System.out.println( df.format(12345678)); // 1.2E7
              // signif digits = TOTAL int digits + max fractional digits
         System.out.println("X");
              df.applyPattern("###.#E0");                    // how did it decide to place decimal where it did?
              System.out.println( df.format(12345678)); // 12.35E6    // why did it violate my "1 max fractional digit"
                                                 // request? I would have expected 123.5E5
              df.applyPattern("##.#E0");
              System.out.println( df.format(12345678)); // 12.3E6
              df.applyPattern("#.#E0");
              System.out.println( df.format(12345678)); // 1.2E7
              //signif digits - TOTAL int digits + max fractional didgits
         System.out.println("");
         System.out.println("XXXXXXXX");
              df.applyPattern("#000.#E0");
              System.out.println( df.format(12345678));  // 1234.6E4
              df.applyPattern("#00.#E0");
              System.out.println( df.format(12345678));  // 12.35E6       // how did it decide to place decimal where it did?
                                                 // why did it violate my "1 max fractional digit"
                                                 // request? I would have expected 123.5E5
              df.applyPattern("#0.#E0");
              System.out.println( df.format(12345678)); //  12.3E6
              // significant digtis = TOTAL int digits + max fractional digits
         System.out.println("");
              df.applyPattern("###0.#E0");
              System.out.println( df.format(12345678));  // 1234.6E4
              df.applyPattern("##0.#E0");                    // how did it decide to place decimal where it did?
              System.out.println( df.format(12345678));  // 12.35E6     // why did it violate my "1 max fractional digit"
                                                 // request? I would have expected 123.5E5
              System.out.println( df.format(12345678));  // 12.35E6
              df.applyPattern("##.#E0");
              System.out.println( df.format(12345678));  // 12.3E6
    //API example from DecimaFormat RE Scientific Notation.. api says this will print 12.3E3
              df.applyPattern("###.##E0");
              System.out.println( df.format(12345)); //12.345E3   //violates max fractiona digit request
    //NOTE DOCS ARE WRONG ... the number of significant digits is = to max integer digits (number of # and 0 prior
    // to decimal point)  PLUS max number of digits after the decimal point... NOT Min. Integer digits + Max fractional digits
              // suggested pattern
              df.applyPattern("000000.##E0");
              System.out.println( df.format(12345678));  //123456.78

  • External table.How to load numbers (decimal and scientific notation format)

    Hi all, I need to load inside an external table records that contain 7 fields. The last field is called AMOUNT and it's represented in some records with the decimal format, in others records with the scientific notation format as, for example, below:
    CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Jan;11200100;'60800;CYZ900;41380,77
    The External table's script is the following:
    CREATE TABLE HYP_DATA
    COUNTRY VARCHAR2(50 BYTE),
    YEAR VARCHAR2(20 BYTE),
    PERIOD VARCHAR2(20 BYTE),
    ACCOUNT VARCHAR2(50 BYTE),
    DEPT VARCHAR2(20 BYTE),
    ACTIVITY_LOC VARCHAR2(20 BYTE),
    AMOUNT VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY HYP_DATA_DIR
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'HYP_BAD_DIR':'HYP_LOAD.bad'
    DISCARDFILE 'HYP_DISCARD_DIR':'HYP_LOAD.dsc'
    LOGFILE 'HYP_LOG_DIR':'HYP_LOAD.log'
    SKIP 0
    FIELDS TERMINATED BY ";"
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    "COUNTRY" Char,
    "YEAR" Char,
    "PERIOD" Char,
    "ACCOUNT" Char,
    "DEPT" Char,
    "ACTIVITY_LOC" Char,
    "AMOUNT" Char
    LOCATION (HYP_DATA_DIR:'Total.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;
    If, for the field AMOUNT I use the datatype VARCHAR (as above), the table is loaded but I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation as:
    CY001_STATU;2009;Jan;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Feb;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Mar;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    CY001_STATU;2009;Dec;11220020GR;'03900;CYZ900;-9,99999999839929e-03
    All the others records with a decimal AMOUNT are loaded correctly.
    So, my problem is that I NEED to load all the records (with the decimal and the scientific notation format) together (without records rejected), but I don't know which datatype I have to use for the AMOUNT field....
    Anybody has any idea ???
    Any help would be appreciated
    Thanks in advance
    Alex

    @OP,
    What version of Oracle are you using?
    Just cut'n'paste of you script and example woked FINE for me.
    however my quation is... An external table will LOAD all data or none at all. How are you validating/concluding that...
    I have some records rejected, and all these records contain the last field AMOUNT with the scientific notation
    select * from v$version where rownum <2;
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    select * from mydata;
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Feb     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11200100     '60800     CYZ900     41380,77
    CY001_STATU     2009     Mar     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Dec     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11220020GR     '03900     CYZ900     -9,99999999839929e-03
    CY001_STATU     2009     Jan     11200100     '60800     CYZ900     41380,77MYDATA table script is...
    drop table mydata;
    CREATE TABLE mydata
    COUNTRY VARCHAR2(50 BYTE),
    YEAR VARCHAR2(20 BYTE),
    PERIOD VARCHAR2(20 BYTE),
    ACCOUNT VARCHAR2(50 BYTE),
    DEPT VARCHAR2(20 BYTE),
    ACTIVITY_LOC VARCHAR2(20 BYTE),
    AMOUNT VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY IN_DIR
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'IN_DIR':'HYP_LOAD.bad'
    DISCARDFILE 'IN_DIR':'HYP_LOAD.dsc'
    LOGFILE 'IN_DIR':'HYP_LOAD.log'
    SKIP 0
    FIELDS TERMINATED BY ";"
    MISSING FIELD VALUES ARE NULL
    REJECT ROWS WITH ALL NULL FIELDS
    "COUNTRY" Char,
    "YEAR" Char,
    "PERIOD" Char,
    "ACCOUNT" Char,
    "DEPT" Char,
    "ACTIVITY_LOC" Char,
    "AMOUNT" Char
    LOCATION (IN_DIR:'total.txt')
    REJECT LIMIT UNLIMITED
    NOPARALLEL
    NOMONITORING;vr,
    Sudhakar B.

Maybe you are looking for