Parsing long numbers as strings

Hi
Is there any way you can prevent a long number being converted to scientific notation? I have to write a method that substrs out each numeric character from a long positive whole number but when the number gets lon it falls over as the number is converted to scientific notation containing '.' and 'E' etc
Any help would be appreciated
Cheers

Hi guys
Thanks for the replies. I think the FM with 63 9s will probably be the simplest.
I'm sorry I wasn't able to post an example as I was just heading out of the office for the day, but have got home so, for completeness will try to pen an example...although I don't have a server here so will be guessing syntax etc :-)
Please forgive me if it doesn't run first time, but it should convey the intention...if necessary I'll debug it in the morning.
Cheers
declare
mystring varchar2(1000) := '9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999';
thisnum number;
retnum number := 0;
k number;
begin
k:=1;
while k >0 loop
for i in 1...length(mystring) loop
thisnum != to_number(substr(mystring,i,1));
retnum := retnum +thisnum;
end loop;
if length(retnum) > 60 then
mystring := 'retnum';
else
k :=0;
end if;
end loop;
--in the real case the retnum value would be stored at this point
end;
the 'while' loop if needed for very long strings where the 'addition' step hasn't decreased the length enough to be parsed as a number, the problem I have encountered only happens when the resulting number from the first run is long enough for an implicit conversion to scientific notation, this example may not be long enough to trigger it.

Similar Messages

  • Parsing long numbers very huge

    Hi all:
    How i can parse a long number like this:
    String variable="E898374636475837";
    long v=Long.parseLong(variable);
    This code throw:
    Exception in thread "main" java.lang.NumberFormatException: E898374636475837
    at java.lang.Long.parseLong(Long.java:310)
    at java.lang.Long.parseLong(Long.java:363)
    at q.main(q.java:6)
    Please help me, I nedd parse many DES keys entered by the user keyboard.
    Thanks.

    The long number is very huge.
    Long number can store only 2 to the power 64 's
    value.But not that huge.... The range of long is from -2^63 to 2^63-1. The value here is not in that range.
    You'll need the class java.math.BigInteger to represent that value and it also has parsing methods of it's own; check the docs.

  • Need to convert a long into a string, please

    hi there
    i need to convert a long into a string. can i just cast it like this:
    (String)longNumber = some function that returns a long;

    Why not just use Long.toString()? If you start with a long value, you can create a Long object and get it's value as a String.

  • Pre-parsing user-entered query strings

    I'm looking for a robust PL/SQL (or other) script for pre-parsing user-entered query strings, so I can make intermedia work like familiar search engines. (Think Yahoo/Alta Vista.) It has to deal gracefully and intuitively with embedded special characters, boolean constructs, quoted literals, etc.
    Has Oracle released anything like this?

    There's example code in "The Button" download from http://technet.oracle.com/products/intermedia in the file "avquery.java".
    Putting the query directly into ABOUT() also works if you don't need to clean up end-user input.
    null

  • I have a long numbers document, that I'd like to make more print friendly. It is a list of my DVD's that I just listed one after the other (1-200) when I tried to print it, it would be 18 pages, can I change it to be more like columns side by side to save

    I have a long numbers document, that I'd like to make more print friendly.
    It is a list of my DVD's that I just listed one after the other (1-200) when I tried to print it, it would be 18 pages,
    can I change it to be more like columns side by side to save paper?

    S,
    I assume that you also have Pages on your computer (or some other capable WP program). I also assume that you have eliminated any unnecessary columns, so you have a 1-column table in Numbers.
    When it comes time to print, Copy the entire Table: Click on the table name in the Sheets Pane and Command-C.
    Switch to Pages, open a blank WP template and set the number of columns to 3 or so. With the Text Insertion Cursor flashing on the first line of the first column of the blank template, Command-V. Your table should paste into the Pages document as an Inline Object and will Wrap on the page as you desire. Then Print in Pages.
    Jerry

  • Parse a Date to String

    Hi
    i would use this to parse String to Date :
    public Date parseFromString(String dateString){
          try {
              java.text.SimpleDateFormat formatter
                  = new java.text.SimpleDateFormat("dd/MM/yy");
              return formatter.parse(dateString);
          catch (Exception e) {
          return null;
      }how can i parse a Date to string?
    Thanks
    D

    check the API Docs for SimpleDateFormat - particularly the format method. public StringFormatFromDate(Date date){
          try {
              java.text.SimpleDateFormat formatter
                  = new java.text.SimpleDateFormat("dd/MM/yy");
              return formatter.format(date);
          catch (Exception e) {
               // You really shouldn't catch Exception - and you really should do something in your catch
               // blocks so you don't post a question like "my code executes no problem, but nothing happens...
               e.printStackTrace();
          return null;
      }

  • How to change the long in to string

    Hi
    In my program i get the long value as input.
    Then i send this long value to one method for testing which accepts the argument as String.So i have to change my long in to string then i pass it to the method.
    can anybody tell me how to change my long in to string?
    Thank you so much

    There's probably a method java.lang.Long.toString.
    If not, there's probably something a lot like it in either the Long or String classes.
    I'll leave you the pleasure of looking it up in the API docs.

  • Parsing localized numbers

    I'm trying to use NumberFormat to validate a string containing a formatted number but having a lot of problems. First, invalid strings are just ignored (same thing as http://forum.java.sun.com/thread.jsp?forum=31&thread=157703)
    Also in French, space is used as thousands separators, however if I use a string with space only only the thousands are parsed, i.e.:
    String value = "1 234,45";
    try {
       Number number = NumberFormat.getNumberInstance(Locale.FRENCH).parse(value);
    System.out.println(number.floatValue());
    } catch (ParseException e) {
       e.printStackTrace();
    }The output:
    1.0
    Any help? Thanks!

    With the NumberFormat, you will get an exception only if the very first character is not parseable. But you don't have to write your own parse routine, just do this:
    import java.text.*;
    import java.util.*;
    public class number {
       public static void main(String[] args) {
          try {
             DecimalFormatSymbols df = new DecimalFormatSymbols(Locale.FRENCH);
             df.setDecimalSeparator(',');
             df.setGroupingSeparator(' ');
             DecimalFormat NF=new DecimalFormat("#,###.##",df);
             String out=NF.format(-1234.56);
             System.out.println(out);
             ParsePosition PP=new ParsePosition(0);
             Number number = NF.parse(args[0],PP);
             if (PP.getIndex()!=args[0].length()) System.out.println("Parse Exception");
             System.out.println(number);
          } catch (Throwable exception) {
             exception.printStackTrace();
    }V.V.

  • Parsing out numbers

    Trying to parse out the number strings into its own columns with this expression:
    WITH T as
    (SELECT  '53-2010-2-101' test_string FROM DUAL union all
    SELECT  '2219-2010-3-22' FROM DUAL union all
    SELECT  '236350-2010-4-3' FROM DUAL)
    SELECT SUBSTR(test_string,INSTR(test_string,'-')-2) stu_id,   --This is incorrect
    SUBSTR(test_string,INSTR(test_string,'-',1,1)+1,4) fiscal_yr, 
    SUBSTR(test_string,INSTR(test_string,'-',1,2)+1,1) sess,      
    SUBSTR(test_string,INSTR(test_string,'-',1,3)+1,5) sch_id     
    FROM THaving problems with stu_id. How to count backwards with substr and instr? The results should look like so:
    STU_ID                         FISCAL_YR                     SESS                                        SCH_ID
    53                             2010                           2                                           101
    2219                         2010                           3                                            22
    236350                         2010                           4                                             3Thanks

    Would it be something like this?
    WITH T as
    (SELECT  '53-2010-2-101' test_string FROM DUAL union all
    SELECT  '2219-2010-3-22' FROM DUAL union all
    SELECT  '236350-2010-4-3' FROM DUAL)
    -- end of sample data
    SELECT substr(test_string, 1, instr(test_string, '-') - 1) stu_id,
            substr(test_string, instr(test_string, '-', 1, 1) + 1, 4) fiscal_yr,
            substr(test_string,
                   instr(test_string, '-', 1, 2) + 1,
                   instr(test_string, '-', 1, 3) - instr(test_string, '-', 1, 2) - 1) sess,
            substr(test_string, instr(test_string, '-', 1, 3) + 1, 5) sch_id
       FROM tSample execution:
    SQL> WITH T as
      2  (SELECT  '53-2010-2-101' test_string FROM DUAL union all
      3   SELECT  '2219-2010-3-22' FROM DUAL union all
      4   SELECT  '236350-2010-4-3' FROM DUAL)
      5   -- end of sample data
      6   SELECT substr(test_string, 1, instr(test_string, '-') - 1) stu_id,
      7          substr(test_string, instr(test_string, '-', 1, 1) + 1, 4) fiscal_yr,
      8          substr(test_string,
      9                 instr(test_string, '-', 1, 2) + 1,
    10                 instr(test_string, '-', 1, 3) - instr(test_string, '-', 1, 2) - 1) sess,
    11          substr(test_string, instr(test_string, '-', 1, 3) + 1, 5) sch_id
    12     FROM t;
    STU_ID          FISCAL_YR SESS            SCH_ID
    53              2010      2               101
    2219            2010      3               22
    236350          2010      4               3
    SQL> With regular expressions would look something like this:
    WITH T as
    (SELECT  '53-2010-2-101' test_string FROM DUAL union all
    SELECT  '2219-2010-3-22' FROM DUAL union all
    SELECT  '236350-2010-4-3' FROM DUAL)
    SELECT regexp_substr(test_string, '\d+', 1, 1) stu_id,
            regexp_substr(test_string, '\d+', 1, 2) fiscal_yr,
            regexp_substr(test_string, '\d+', 1, 3) sess,
            regexp_substr(test_string, '\d+', 1, 4) sch_id
       FROM t;Edited by: fsitja on Jan 28, 2010 6:07 PM

  • How to error check string for LONG list of strings

    Hi All,
    Let's say I want to compare a string variable with a long list of strings to see if it matches anything in that list. Is there some built-in function that will make this easy. Or should I do it the old fashioned way and load a string array with the list and then for loop through the array comparing each element?
    Cheers,
    ScKaSx

    ScKaSx wrote:
    I'm alittle weak at using interfaces. If the string I am trying to compare is (String grade), then how do I define my List to be ("A+", "A", "A-", "B+", "B", "B-", "C+", "C", .....). This is as far as I've got:
    String grade = 'some letter to be compared'
    String [] GradeList = new String [] {"A+", "A", "A-", "B+", "B", "B-", "C+", "C", .....};Maybe I could summarize what I meant using your example:
    Set<String> PossibleGrades = new HashSet();
    PossibleGrades.add("A+");
    PossibleGrades.add("C");
    String grade = "some letter to be compared";
    if(PossibleGrades.contains(grade) )
       // do something...
    }

  • Converting a long to a string  (PLEASE HELP)

    I am trying to convert a long to a string so that I can put it into a vector. I have this:
    long fileSize = 0;
    String fileModDate = null;
    Vector fileList = new Vector();
         ~~~~~~~
    File [] files = myDir.listFiles();
    for (int i = 0; i<files.length; i++){
    fileSize = files.length();
    String s = fileSize.toString();
    //do the same for the mod date
    fileModDate = files[i].lastModified();
    When i try this, i get an error that long can not be dereferenced. Can anyone please help?

    There are two ways to solve this problem. You are trying to convert a primative type to a string without using its wrapper function (Long). So if you created a long variable as a (Long) object you could call its toString() method and this would work...
    The other way is to simply use the static method in the String class valueOf(long) as follows:
    String longString = String.valueOf(i);Hope this helps.
    Mark

  • Dbms_sql.parse and ora-01704: string literal too long

    I am using the version of dbms_sql.parse that is supposed to take large sql statements but I still get the ora-1704 error when the total length of the statement exceeds 4000k...
    Why?
    This is my test code
    declare
      v_sql     varchar2(32000) := 'select '''|| lpad('A',8000,'M') || ''' from dual';
      l_length  number := 250;
      l_number  number := round(length(v_sql)/l_length) + 1;
      l_lines   DBMS_SQL.varchar2s;
      l_cur     PLS_INTEGER        := DBMS_SQL.open_cursor;
       v_temp varchar2(255);
    begin
    for i in 1..l_number
    loop
       l_lines(l_lines.count+1) := substr(v_sql,(i-1)*l_length+1, l_length);
    end loop;
    DBMS_SQL.parse (  c => l_cur
                      ,statement => l_lines
                      ,lb => l_lines.FIRST
                      ,ub => l_lines.LAST
                      ,lfflg => false
                      ,language_flag =>DBMS_SQL.native
    DBMS_SQL.close_cursor (l_cur);
    end;sorry for the bad layout, I remember having a tag on this forum but it's no longer working?
    Edited by: Wendy Tromp on Jul 22, 2009 10:13 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    the literal you use in the SELECT statement is simply to long.
    You can't execute this statement:
    select 'MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM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MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMA' from dualThe literal is a CHAR and the SQL limit for that is 4000, this one is 8000
    btw, the markup for your code is (curly brackets - lower case - before and after your code)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Parsing multiple digit numbers from string

    I have a string, specifically "Cups = 30" that I need to parse out "30" from. How can I do this? I've gone through tokenizing, it's dirivng me crazy!!

    This program will help you
    import java.util.*;
    class s21
    public static void main(String args[])
    try
    String s1="Cups=30";
    StringTokenizer st=new StringTokenizer(s1,"=");
    while(st.hasMoreTokens())
    st.nextToken();
    System.out.println(st.nextToken());//This statement will
    give 30 as output
    catch(Exception e)
    System.out.println(e);

  • Dynamic Variable name (for int/long) from a String variable

    Hi,
    I want to give a int/long variable name from a String.
    for ex.
    String str = lookup + "Id";
    lookup is a String variable coming from XML. Now, for instance lookup="name". So str = "nameId".
    Now I want to create a int/long variable by nameId.
    Could anybody tell me the way how to do. Please don't tell to use MAP.
    Edited by: Shah on Dec 5, 2007 3:26 PM

    Well you can't. Use a Map.
    The compiler translates variable names into slot numbers, either within an object or withing the local "stack frame" and these slot numbers are assigned names at compile time. No new slots can be created at run time. Java is not Basic.
    Reflection allows you to find existing field names and methods (not local variables), so it's possible to map, for example, XML attribute names to field names or setters in an object but the names have to be known at compile time.

  • I need help parsing a  swift data string

    i need to parse swift financial data
    is there a way to use split or stringtokenizer for ::
    and keep the :: as part of the new seperated data.
    i want to put each string starting with :: on a seperate line in a text box.
    i gave up and tried it with a loop and a stringbuffer , and indexof.
    if (line.indexOf("::") == Strpos ){
    frame.jTextArea1.append(displayline.toString());
    displayline = new StringBuffer();
    displayline.append(line.substring(Strpos, (Strpos + 2)));
    Strpos += 2;
    if (line.indexOf("::") != Strpos ) {
    displayline.append(line.substring(Strpos, Strpos + 1));
    System.out.println( displayline);
    Strpos++;
    but i cant get that to work either.
    if anyone knows how to parse swift data please give me your email address.
    i've been doing it in cobol for 15 yrs and i just cant get the cobol techniques to translate to java.
    thanks.

    as i said
    i am really a cobol guy
    and yes as you see i did try to use indexof in my code.
    but there must be something about indexof that i'm not getting.
    it works the first time in the loop but then as i increment my start position(strpos)
    the indsex of no longer works.
    am i using the correct technique to increment the start position thru the string buffer.
    thanks guys.

Maybe you are looking for

  • How can i move a mail message from INBOX to other Folder

    I want to store all the mail messages to some specific folder after read it. i tried it with setFlags but it's not working Plz suggest any of the option Thanks in advance ..

  • My iMac freezes when updating my apps in iTunes

    My iMac is a 24" with 3,06GHz Intel Core 2 Duo and 4GB 800MHz DDR2 RAM. After the installation of Lion, every time I try to download the updated apps inside iTunes (yes, it happens just with iTunes since the Lion installation!) after one or two minut

  • Preview - PDF files?

    Okay soo confused here. I cannot find where to post this topic. I have an online class, and that class comes with an online textbook that is opened with the application Preview automatically. I want to search for a specific topic, so I enter it in th

  • Problems viewing the edited raw file in bridge

    Up until recently my Adobe Bridge has been working beautifully. I opened up a job to edit in Adobe Bridge that are all shot in RAW with my 5D Mark II camera. I am working on a MacBook Pro (10.4.11). When I bring a photo into Camera Raw (by pressing a

  • PDF Layers export

    I need to automate the exporting of layers from a PDF. There will be some logic to match up certain layers and I can handle that, I'm just wondering what is the best way to go about it. Should I go the batch processing route or some other way? I'm on