Problem with function, need to return a very large number

I have a function that is used to derive a number by using a defined algorithm. We have tested it many times in our 'development' region and it works. We moved it to our 'UAT' region and now the function is giving an error. The data is the same in both oracle instances. So.... dba's are telling me it is the function. At this point, I don't know what to do.
Can I declare "RESULT" in a function so that it can return a number this big: 2.00023880306E24?
Oracle returns -6502 error in the deriveNewNum function.
Here is the error:
*** ERROR in deriveNewNum.fnc
SQLCODE: -6502
ORA-06502: PL/SQL: numeric or value error: number precision too large
BEGIN TF1ID; END;
ERROR at line 1:
ORA-06503: PL/SQL: Function returned without value
ORA-06512: at DERIVENEWNUM", line 93
ORA-06512: at line 1

Hi,
Did you look up that error in the error messages manual?
http://download.oracle.com/docs/cd/B28359_01/server.111/b28278/e4100.htm#sthref1889
Is there something there that you didn't understand?
<h3>ORA-06502: PL/SQL: numeric or value errorstring </h3>
Cause: An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action: Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
If you declare variables like this:
x     NUMBER;
y     NUMBER (20, 10);there woul be no problem assigning a value like 2E24 to x, but there would be if you tried it with y.
How are your varaibles declared.
Whenever you have a problem with your code, post your code.
Always say what version of Oracle you're using.

Similar Messages

  • Need to hold very large number - please help

    Hello all,
    I am working with programming the SSH handshake and need to represent a very large number in order to get it to work correctly. The number is:
    179769313486231590770839156793787453197860296048756011706444423684197180216158519368947833795864925541502180565485980503646440548199239100050792877003355816639229553136239076508735759914822574862575007425302077447712589550957937778424442426617334727629299387668709205606050270810842907692932019128194467627007
    which is: 1.7 *10^318
    and we know the largest double is:
    1.7976931348623157E308
    Can someone please help me with representing this number? It is a very large prime number that is used in the key exchange for SSH.
    Thank you all for you time
    Max

    And who's the slowest old sod again?
    This is amazing: I read a new topic, no repliesyet,
    I check it again, nothing yet,
    I craft my reply and presto: some quick fingersbeat
    me to it again ...Grolsch makes slow :P ;)It's still only 11:45ag ... and I'm still waiting ;-)
    Jos

  • I'M HAVING PROBLEM WITH FUNCTION KEY, I'M HAVING PROBLEM WITH FUNCTION KEY

    Hello everybody
    Recently i'm having problem with function key of iphone4, now its working assistive touch key board , between these days i had restored and update then it work for next 12 hour after that it again stoped..
    pls help me from this isssue,
    thanking you.

    There are no function keys on the iPhone.
    Please clearly state the issue that is occurring.

  • Problem with function "DBConnect" in TestStand/LabWindows

    Hello, good day.
    I'm having some problems with the function DBConnect that I'm using in a personal function inside a DLL.
    I have made a function called GetSensor which I know it works because I have used it and tested it in the LabWindows enviroment.
    His function is return the value of some element in my database according of his input parameter, just that.
    My problem comes out when I tried to use that same function in TestStand, it seems that the DBConnect cannot work as in the same way of when it is used from LabWindows because always show a warning message, which is display only when the values of iHdbc are iHdbc==-11 or  iHdbc==-10.
    The softwares that I'm using are:
    I know TestStand is opening the function from my DLL becasuse it always get in, but did not pass the part when try to connect to the database.
    I think this could be a compatibility issue between LabWindows and TestStand, but I do not find where can I modify some options to fix this problem.
    Thanks in advance. Any help you could give will be welcomed.

    Hi,
    Looking at the code i dont see any issue wrt Teststand interface.
    The variable passed from TestStand to CVI code is not used to connect to DB.
    When you say it works fine with CVI only - did you try to build a  CVI application on the same machine with the same code and try?
    If the CVI application also gives the same error then you need to install a CVI addon SQL toolkit for DB to work.
    Hope this helps.
    Ravi
     

  • Hp 8600 All in one printer problem with scanning through wired network its very slow!

    Hi
        i have problem with scanning thru network which takes almost more than 2minutes very slow compared to scanning when printer connected locally with USB.  i need some solution to fix this issue. Plz advise me what needs to be done prior to scanning? 

    Welcome to the community @Larrypat 
    I understand your printer is not connecting wireless and only connecting USB. I have some questions and ideas for you that should help. Let's get to it!
    Could you please remove the USB cable, run the Print and Scan Doctor again and send me a screen shot of the results from running the diagnostic tool?
    Also let me know which model from the C7200 series you have:
    HP Photosmart C7250 All-in-One Printer
     HP Photosmart C7280 All-in-One Printer
     HP Photosmart C7288 All-in-One Printer
    Try power cycling the network devices:
    Turn off the printer and computer and unplug the router for 1 minute (do not press any buttons on the router).
    Plug the router back in and wait another minute, next turn on the printer and computer. Run the Print and Scan Doctor afterwards and try printing.
    Let me know how it goes and the results
    R a i n b o w 7000I work on behalf of HP
    Click the “Kudos Thumbs Up" at the bottom of this post to say
    “Thanks” for helping!
    Click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution!

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Problem with sysdba need help

    I faced a difficult problem with sysdba. The thing is, I don't have a user name " 1/2@3 ". But the moment I connected as 1/2@3 as sysdba, then it connected automatically and to utter surprise I could drop a user.
    If it is so, then how the database will remain secure.
    Definitely there is a solution and I need it urgently.

    Hi
    c:\> sqlplus "/ as sysdba"
    After logging into SQL, check the username using:
    SQL> Show user
    If the above command returns "sys", change the password of the user "sys" using:
    SQL> Alter user sys identified by "yourpassword";
    Thank You

  • Problem with function 'GUI_DOWNLOAD'

    Hi to everybody!!
    I've a problem with the function GUI_DOWNLOAD, when I execute the program this make a dump and the problem is in this function.
    I've read the log and this said that :
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_PARAM_NOT_FOUND', was
      not caught in
    procedure "CREAR_FICHERO" "(FORM)", nor was it propagated by a RAISING clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    Function module "GUI_DOWNLOAD" was called
    with the parameter "ACCESS_DENIED".
    This parameter is not defined.
    Can anybody tell me what's the meaning of this?
    Thanks very much,
    Regards,
    Rebeca

    Hi,
    You must have the write access to the file in OS level to which you are trying to download the table content using the function module 'GUI_DOWNLOAD'.The error occurs because the system is trying to write in a file to which, the write permission is not permitted for the user.If you are catching the exceptions properly.It will give the proper message instead of dump.
    Regards,
    Ajith

  • Problem with function ADDR_UPDATE

    Hi Everybody! I'm doing a vendor modification for the basic view, but a have a problem. I need to change several dates, like name, address and phone numbers. I found the function ADDR_UPDATE, which work perfectly but no change the phone number 1 and phone number 2.
    I try to make a Batch Input with SHDB and transaction XK02, but this don't make any changes over address fields and neither with phone number 2 (LFA1-TELF2). Did anyone know how change the field number2 (LFA1-TELF2)???
    thanks for help!!
    Oscar Requez
    ABAP developer
    Venezuela

    Hi and thanks for the ideas!!!!
    i found a way close to that I want. But still not be the one:
    After do CALL FUNCTION 'ADDR_UPDATE':
        CLEAR xadtel.
        xadtel-tel_number = ztelf2.<b>(number that I need)</b>
        xadtel-DFT_RECEIV = 'X'. <b>(ind. that SMS)</b>
        xadtel-updateflag = 'I'. (Insert in the table phone)
        APPEND xadtel.
        CALL FUNCTION 'ADDR_COMM_MAINTAIN'
          EXPORTING
          address_handle    = address_handle
            address_number    = et_adrc-addrnumber
            table_type        = 'ADTEL'
          TABLES
            comm_table        = xadtel
            error_table       = lt_error
            comm_table_out    = adtel_out
          EXCEPTIONS
            parameter_error   = 1
            address_not_exist = 2
            internal_error    = 3
            OTHERS            = 4.
        CALL FUNCTION 'ADDR_MEMORY_SAVE'.
    Now I have a number that work like Mobile phone number. But I don't know how make in batch, the next step.
    that would be, press the button "phone -> mobile phone" in the sub-screen that show when I press the button next to phone number.

  • Problem with function "DBConnect" in LabWindows/TestStand

    Hello, good day.
    I'm having some problems with the function DBConnect.
    I have made a function called GetSensor which I know it works because I have used it and tested it in the LabWindows enviroment.
    His function is return the value of some element in my database according of his input parameter, just that.
    My problem is that when I tried to use that same function in TestStand, it seems that the DBConnect cannot work as in the same way of when it is used from LabWindows because always show a warning message, which is display only when the values of iHdbc are iHdbc==-11 or  iHdbc==-10.
    The softwares that I'm using are:
    Thanks in advance. Any help you could give will be welcomed.
     

    The solution to my problem with the function DBConnect was to use NI TestStand 2014 (32-bit) instead of the NI TestStand 2014 (64-bit) version I was using. Just that.
     

  • Problems with function

    Hi
    I have a problem with the FM ' <b>HRVE_CONVERT_CURR_NAT_PAY_TABS</b>'
    i need convert the currency in the table PS_EVAL , but i have a dump for conflit type with the declarations of my table.
    Which type of declarations can i use for my table?
    How can i use this FM for convert currency in table PS_EVAL?
    Thanks for your help
    Regards
    Gregory

    Hi
    <b>part of my dump</b>
    The call to the function module "HRVE_CONVERT_CURR_NAT_PAY_TABS" is incorrect:
    The function module interface allows you to specify only fields
    of a particular type under "CT_PS_EVAL". The field "WA_PS_EVAL" specified here has a different field type.
    <b>My Code :</b>
                  LOOP AT ps_eval.
                    linea = sy-tabix.
                    MOVE-CORRESPONDING ps_eval TO wa_ps_eval.
                    call function 'HRVE_CONVERT_CURR_NAT_PAY_TABS'
                         exporting
                              iv_target_currency    = moneda_endda
                              iv_currency_rate_date = pn-endda
                              iv_pernr              = pernr_aux
                              iv_seqnr              = evpdir-seqnr
                         changing
                              ct_ps_eval            = wa_ps_eval
                         exceptions
                              error                 = 1
                              others                = 2.
                  ENDLOOP.
    Regards
    Gregory

  • Problem with tables -- need help!

    I am having problems with table formatting, when using
    Preformatted text. The tables look fine in the WYSIWYG editor, but
    have lots of extra space above and below the text when looking at
    the output files.
    I will attach the code from one of the HTML files from my
    project, so you can see what I'm talking about.
    Thanks.

    Well, if you're talking about the single-celled table with
    the line:
    <p class=Preformatted>[assembly:
    Ace.AceAssembly]</p>
    </pre>
    ... you can eliminate the <P> tags. that will give you
    one line less. Otherwise, your remaining space is the result of the
    <PRE> tag. It, like the <XMP> tag, gives it one line of
    space beneath as well.
    Your alternative beyond that would be to, when needed, wrap
    up the script in Javascript. That line, for instance, wouldn't need
    it.

  • Problem with function arguments

    I am having a problem with arguments to a function not
    working. In the attached example, the values passed to the function
    are never reflected within the function.
    Can any one tell me what I am doing wrong?
    Thanks,
    David

    hey drzeller,
    i just copied and pasted the original code you attached to
    this thread into flash and kglad is right. there is no problem with
    any of it. i didn't check your values before i altered your code
    originally, i just assumed they were outputting the values you
    posted. if you will copy and paste your original code back into
    flash and check the output window you will see what kglad is
    talking about.
    just so you know, all the advice i've ever seen in this forum
    from kglad has been spot on. definitely use his advice.

  • Serious problem with database need help

    hello experts
    i am working with MS-ACCESS and connecting it with java programing
    now the problem with me are
    according to my need i have to create a table that contain Autonumber field
    but when i insert element in this table by query
    String query1 = "insert into Forum (Subject,Author,Date,Reply) values('"+param1+"','"+username+"','"+dateformat+"',"+reply+")";
    st1 = con1.createStatement(); it gives sql exception but when i remove
    autonumber field and make it simple field it works ok but i want to keep autonumber field and thn want to insert it
    is it possible to create a dynamic table in ms-access through java query like
    String query3 = "create table"+"topicId"+"( message varchar(1000) NOT NULL,author varchar(50) NOT NULL, date varchar(30) NOT NULL)";
    here topic id some variable that contain table name
    i think problem is that MS-ACCESS has no varchar data type plz help me
    The complete code i written is as follow
    <html>
    <%@ page language="java" import="java.sql.*,java.text.*"  %>
    <head>
    <title> Processing the post request </title>
    </head>
    <body background ="images/modbkgnd.jpg" bgproperties="fixed" >
    <%
       String param1="",param2="",topicId="";
       Connection con1=null;
       Statement  st1=null;
       ResultSet rs1=null;
       int a=2,reply=0;
       java.util.Date date = new java.util.Date();
       DateFormat df ;
       df = DateFormat.getDateInstance(DateFormat.FULL ,java.util.Locale.UK);
       String dateformat = df.format(date);
       String username = (String)session.getAttribute("forumlogin");
       param1=request.getParameter("Subject");
       param2 =request.getParameter("message");
    try
       Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
       con1 = DriverManager.getConnection("jdbc:odbc:lingua");
       String query1 = "insert into Forum (Subject,Author,Date,Reply) values('"+param1+"','"+username+"','"+dateformat+"',"+reply+")";
       st1 = con1.createStatement();
       out.print("hello i am here");
       boolean posubject = st1.execute(query1);
       out.print("hello i am here");
       String query2 = "select *from Forum";
       rs1 = st1.executeQuery(query2); //retriving table id for creating
        out.print("hello i am here");  //  message table
       while(rs1.next())
           topicId = rs1.getString(1);
       String query3 = "create table"+"topicId"+"( message varchar(1000) NOT NULL,author varchar(50) NOT NULL, date varchar(30) NOT NULL)";
       boolean createtable = st1.execute(query3);
       out.print("hello i am here");
       if(createtable)
          String query4 = "insert into"+"topicId"+"values('"+param2+"','"+username+"','"+dateformat+"')";
          boolean insertmess = st1.execute(query4);
    }catch(SQLException ex){
        out.print("sql exception");
    finally
       st1.close();
       con1.close();
    %>
    </body>
    </html>

    hello experts
    first i change my Date to date and thn try but it was not working.
    and thn i try as dinesh_tcs said
    i change my query as
    String query3 = "create table"+"topicId"+"( message string NOT NULL,author string NOT NULL, date string NOT NULL)";
    but nothing help me
    one more thing actually i don,t want to insert manually the field of autonumber what i want that my query work when i leave the autonumber field to insert values in the table ( or whatever way i want to insert values in that table by keeping autonuber given by MS_ACCESS)
    plz do the change in code i have maintained above or if not possible thn write the query that u have tested

  • Problem with concatenation, need output in a desired format

    Hi all,
    I have a weird problem with concatenation.
    I should get an output in such a way that the result would be
    Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
    For this first to get C:\TEMP\test20090210.xml format I said
    CONCATENATE  'C:\TEMP\test' sy-datum '.XML' INTO filepath.
    For this secondly to get /FOLDER1/test20090210.xml format I said
    CONCATENATE  '/FOLDER1/test' sy-datum '.XML' INTO filepath1.
    Now I need to get the format
    Put C:\TEMP\test20090210.xml  /FOLDER1/test20090210.xml
    And to get this I said
    CONCATENATE  'put' filepath INTO  filepath SEPARATED BY space.
    And the output for filepath was Put C:\TEMP\test20090210.xml.
    But I want u2026u2026u2026.Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml.
    How can I achieve this?
    If I say
    CONCATENATE  filepath INTO  filepath1 SEPARATED BY space. It throws a syntax error saying
    u201CUnable to interpret filepathu201D
    Please help me..i am dying to figure out how to concatenate and get the required output.
    My filepath contains u2026 Put C:\TEMP\test20090210.xml
    My filepath1 contains u2026/FOLDER1/test20090210.xml
    I need final output asu2026u2026u2026u2026.
    Put C:\TEMP\test20090210.xml /FOLDER1/test20090210.xml
    How to attain this..please helpu2026where I am going wrong..i declared filepath and filepath1 as STRING

    Hi all,
    Thanks for immediate reply...now it works..
    but i also need to put a counter like thing to distinguish my files.
    for my filepath....
    i want it as C:\TEMP\test20090210110146 so i said....
    CONCATENATE '    C:\TEMP\test'    sy-datum s   y-uzeit  '.XML'.
    Actually i am generating XML files and naming them as testsystemdatesystemtime.
    But i am concerend that my filed might be overwrriten if a file gets generated in a fraction of a millisecond..so to avoid that now i want to put a counter.
    i.e my filepath should now be as follows each time loop executes...
    C:\TEMP\test20090210110146_1
    C:\TEMP\test20090210110147 _2
    C:\TEMP\test20090210110148 _3.........and son on how can i do it
    i.e testsystemdatesystemtime+ a counter(which tells how many times loop executed)
    Once again thanks to all for immediate help...

Maybe you are looking for

  • Many apps are missing in the Utilities folder.

    Hi there! The MacBook Pro I'm using is Mac OS X, Version 10.7.5. The weird thing is: when I bought it, I tranferred my files from a previous Macbook to this current one using Migration Assistant. But now I couldn't find Migration Assistant in this Pr

  • Frame around a page

    Hello, I'm using iWeb 3.04. I've made a site, I would like to draw a frame around my page (just a simple rectangle). Is this possible? Thanks!

  • Database file size

    I am using Berkeley DB 5.1.19 with replication manager. I am seeing big differences between the size of the db files between the master and the client, is that expected and if so what is the reason. This has impact on the size of the backup too. On t

  • E 63 using both Sim and Memory contacts ?

    when i am searching for the contacts by pressing Menu>comm>contacts....only memory contacts are available ,if i press another time for sim contacts means then only it shows otherwise no...... i am asking solution to show both at a time. and make a gr

  • Firewire Drive Causes Crash at Startup, Safe Boot OK

    I have a LaCie External Drive that all of a sudden decided to start causing OSX to crash at startup. While connected booting normally brings up the "need to restart" screen, booting in Single User causes a Kernel Panic, Safe Boot is ok, Booting from