Can I call MS Excel function in Oracle

Hello world

I have prototyped my application in Microsoft Excel. In this prototype, I use the BETADIST() function, which returns the cumulative beta probability density function. And, Yes, if you're like me and not a statistician, it's pretty crazy. Just for fun, check out the page of wikipedia on this subject, and you'll see what I mean. Anyway, so now I'm doing the same functionality as this function in my Oracle APEX 4.0/Oracle 10 g R2 - app.

I studied this feature a lot, and I couldn't find a function equivalent to Oracle to do what this function. CUME_DIST... nope, DBMS_STATS_FUNC... No. So, I guess I need to figure out what exactly the function and basically rewirte in Oracle using PL/SQL. I already have questions forums statistics and Excel tries to understand this.

But, before I go further and reinventing the wheel by coding the logic embedded in this function (which is very hairy, of course), I wanted to check with you all and see if there is a way to call this function in MS Excel by Oracle. Not sure if an outpatient procedure can access an Excel library, or how if he can.

Any ideas?

Thank you!
Mark

I'm sure that this BETADIST exists in Java.

I think that not natively.

But you can download libraries of COLT of Cern for high performance scientific and technical computing in Java.

Loading libraries by loadjava

loadjava -user michael/xxxx@oracle_server:1521:oracle_sid -verbose -force -order -resolve -thin colt.jar concurrent.jar

and the creation of a function

create or replace function betadist (alpha number, beta number, c number)
     return number
  as
     language java
     name 'cern.jet.stat.Gamma.incompleteBeta(double, double, double) return double';
/

is rather simple.

The appellant

SQL> select betadist(4,5,0.4) from dual
/
BETADIST(4,5,0.4)
-----------------
         ,4059136
1 row selected.

the result coincides fairly well with the example given in the http://www.excelfunctions.net/Excel-Beta-Dist-Function.html.

Tags: Database

Similar Questions

  • Call DLL (c#) function in Oracle Forms

    Hello

    I have a big problem with the method of DLL in Oracle Forms 6i. DLL was written in

    C# and this is the code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using OnlineFPCommon;
    using System.Windows.Forms;
    
    namespace TestNamespace
    {
        public class TestClass
        {
            public static void testMethod()
            {
                MessageBox.Show("testMethod");
            }
        }
    }
    

    I try to call using the Oracle Forms code:

    testlib_lhandle := Ora_Ffi.Load_library('C:\libdir\','test.dll');
    getresult_fhandle := ora_ffi.register_function(testlib_lhandle,'testMethod');
    

    but the second line, when I try to save the function fails. Why? How can I properly invoke this function?

    Only shouts and C is supported.  You can also view notes 285331.1 that this note refers to WebUtil MyOracleSupport, but the same restriction applies in your case.

  • How can I call a public function in a component to another component?

    I have two components: form and Confirmation.  Form is a Web and Confirmation is a TitleWindow.

    Form contains several controls and a "submit" button.  Confirmation contains an OK button.  When the user clicks on the button send, Confirmation is displayed above the form (the form is blurred).  When the user clicks OK on the Confirmation button, I want to perform a function on the form to set default values in controls.

    How can I address the function of the component in the form of Confirmation component so I can start the function?

    Thank you!

    Here is the source

    CustomForm.mxml

    http://www.Adobe.com/2006/mxml"width ="400"height ="300">

    public function callBack(): void {}

    lblStatus.text = "success";

    }

    ]]>

    label = "Submit" / >

    CustomTitle.mxml

    http://www.Adobe.com/2006/mxml '.

    layout = "absolute" width = "200" height = "80".

    showCloseButton = "true" closed = "closeMe (event)" "

    backgroundAlpha = "1".

    Color = "#173553" backgroundColor = "#EEEEEE."

    headerColors = «#FFFFFF, #CBCCCC»

    borderColor = "#666666" borderStyle = "solid" >

    Import mx.managers.PopUpManager;

    public var callBack: Function = new Function();

    private void closeMe(event: Event): void {}

    PopUpManager.removePopUp (this);

    callBack();

    }

    ]]>

    TitleWindowSample.mxml
    "" xmlns = "*".
    layout = "absolute".
    Width = "100%" height = "100%".
    creationComplete = "init ()" > "
    Import mx.managers.PopUpManager;
    private void init (): void {}
    customForm.submit.addEventListener (MouseEvent.CLICK, onMouseClick);
    }
    private void onMouseClick(event: MouseEvent): void {}
    customForm.lblStatus.text = "";
    var customTitle: CustomTitle = new CustomTitle();
    customTitle.callBack = customForm.callBack;
    PopUpManager.addPopUp (customTitle, this);
    PopUpManager.centerPopUp (customTitle);
    }
    ]]>
    Width = "100%" height = "100%".
    verticalAlign = "middle" horizontalAlign = "center" >
  • How can I call a js function when my backing bean method has completed

    I use JEV11G.here is the code:
    < af:panelCollection id = "pc1" >
    < f: facet = 'menus' name / >
    < f: facet name = "toolbar" >
    < af:toolbar id = "t1" >
    < af:inputText id = "it1.
    value="#{pageFlowScope.favoriteTreeMB.searchCriterium}"/ >
    < af:commandButton text = 'Go' id = "cb1".
    actionListener="#{pageFlowScope.favoriteTreeMB.searchTree}"/ >
    < af:commandButton text = "Reset" id = "cb2".
    actionListener="#{pageFlowScope.favoriteTreeMB.resetTree}"/ >
    < / af:toolbar >
    < / f: facet >
    < name f: facet = 'bar of Θtat' / >
    < af:tree value = "#{pageFlowScope.favoriteTreeMB.tree}" var = 'node' "
    rowSelection = 'single' id = 'pt_t23 '.
    Binding = "#{pageFlowScope.favoriteTreeMB.favTree} '"
    partialTriggers =": cb1: cb2" > "

    < f: facet name = "nodeStamp" >
    < af:outputText value = "#{node.attributes ['Filename']}" "
    rendered = "#{node.rendered}" / >
    < / f: facet >
    < / af:tree >
    < / af:panelCollection >
    < / f: facet >

    The tree is refreshed, I just when pageFlowScope.favoriteTreeMB.searchTree is made or a js method will call.

    The doc:

    void addScript (javax.faces.context.FacesContext context, java.lang.String script)

    Adds a script to run during rendering. >

    So you can put the code somewhere and just call it.

    Timo

  • Need to call the stored function

    How can I call a stored function that accept the Date paramterasn return String paramtere
    I use Jdeveloper p4
    ADF BC + JSF

    User,

    You import java.util.Date - should be java.sql.Date.

    John

  • How can I call a function table in pipeline via DB link?

    I am using a function table in pipeline defined in a remote DB (DB_A) of my DB in local (DB_B) via a link DB (DB_A_REMOTE).

    The function table in pipeline is defined in a package with all the specifications of type he needs and works very well when she is called locally but when called it remotely fails

    Here is an example configuration in DB_A:
    connect scott/tiger
    create or replace
    package pkg as
      type rec is record (
        dte date
      );
      type rec_set is table of rec;
      
      function dts(p_eff_date date) return rec_set pipelined;
      function dt(p_eff_date date) return date;
    end;
    /
    create or replace
    PACKAGE BODY pkg AS
    
      function dts(p_eff_date date) return rec_set pipelined AS
        r rec;
      BEGIN
        r.dte := p_eff_date;
        pipe row(r);
        r.dte := r.dte+1;
        pipe row(r);
        RETURN;
      END dts;
    
      function dt(p_eff_date date) return date as
      begin
        return p_eff_date;
      end;
    
    END pkg;
    /
    In DB_B, I have the following configuration:
    create database link DB_A_REMOTE connect to Scott identified by tiger using 'DB_A';
    create or replace synonym RPKG for PKG@DB_A_REMOTE;
    In DB_A, I can access the two PKG functions very well
    SQL> select pkg.dt(sysdate) from dual
    DJ.DT(SYSDATE)       
    ----------------------
    21-SEP-2012 11:26:31   
    
    SQL> select * from table(pkg.dts(sysdate))
    DTE                  
    ----------------------
    21-SEP-2012 11:26:31   
    22-SEP-2012 11:26:31   
    23-SEP-2012 11:26:31   
    24-SEP-2012 11:26:31   
    However, in DB_B the I get the following:
    SQL> select rpkg.dt(sysdate) from dual
    RPKG.DT(SYSDATE)     
    ----------------------
    21-SEP-2012 11:29:05   
    
    SQL> select * from table(rpkg.dts(sysdate))
    
    Error starting at line 2 in command:
    select * from table(rpkg.dts(sysdate))
    Error at Command Line:2 Column:20
    Error report:
    SQL Error: ORA-06553: PLS-752: Table function DTS is in an inconsistent state.
    06553. 00000 -  "PLS-%s: %s"
    *Cause:    
    *Action:
    selection rpkg.dt shows I can get to the remote package and run functions in it, but the second line is where my problem.

    Why the function table in an inconsistent state and how can I fix this problem so that it will work in all of the linlk database?

    Published by: Sentinel on September 21, 2012 11:35

    Go! You have posted more than 1,000 times and know that you must provide your Oracle version 4-digit.
    >
    Why the function table in an inconsistent state and how can I fix this problem so that it will work in all of the linlk database?
    >
    You can't - it is not supported.

    See the note under the PIPELINED clause in the declaration section of the definition of the doc of PL/SQL and function
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e25519/function.htm
    >
    Note:

    You cannot run a function table in pipeline over a database link. The reason is that the return type of a function table in pipeline is a SQL type defined by the user, which can be used in a single database (as explained in the Guide of the Oracle object-relational database developer). Although the return type of a function table in pipeline may appear as a PL/SQL type, the database actually converts this PL/SQL type to a type defined by the corresponding SQL user.
    >
    Your code using PL/SQL types for these types are implicitly converted to the SQL type needed to access the service using SQL. But the SQL types have an OID (object ID) which is not recognized on the other server so that the other server is unable to create the appropriate type.

    If you click on the link provided to the other doc in this note, you will see that even though you can create a type and specify an OID you still won't be able to use it as you wish.
    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e11822/adobjbas.htm#ADOBJ7083
    >
    Restriction on the use of Types defined by the user with a remote database

    Objects or user-defined types (specifically, types declared with a SQL CREATE TYPE statement, as opposed to types declared in a PL/SQL package) are currently only useful in a single database. Oracle database limits the use of a link of database as follows:

    Unable to connect to a remote database for select, insert, or update a type defined by the user or a REF object on a remote table.

    You can use the CREATE TYPE statement with the Optional keyword OID to create an object identifier specified by the user (OID) that allows an object type for use in multiple databases. See the discussion on the attribution of an OID for a type of object in Oracle Database Data Cartridge Developer's Guide.

    You cannot use the links from the database of the PL/SQL code to declare a local variable of a type defined by the remote user.

    You cannot pass an argument value or return of type user defined in a PL/SQL remote procedure call.

  • Can we call the procedure inside the function?

    Hello

    Can we call the procedure inside the function?

    Thank you
    Brij

    845712 wrote:

    Can we call the procedure inside the function?

    Strange question to ask.

    Yes. This is the standard behavior in most (if not all) procedural and object oriented languages.

    A procedure, function or a method is a unit of code.

    You can call one of the other units. Units can call themselves (recursion). Technically, this means simply by pushing the battery current (to save the stack of the current device memory), the call to the new unit and then popping up battery when control is returned to the unity of the appellant.

    There are very few exceptions to this. The only one that comes to mind programming languages I've used through the years, is natural 1 - could not call a new unit of code to replace the existing one in memory. If no call-and-return was possible.

    Exactly what did you ask this question? Some newcomers to confused Oracle SQL and PL/SQL - two different languages aside server. And then also mistaken for PL/SQL client command vocabulary of SQL * more.

    You will need to make sure that understand the basics of programming (applies to most current programming languages) and Oracle concepts.

  • How to call a DLL function that has need of an array initialized structures which can be written in by the DLL?

    I need to call the following function in a C DLL:

    __declspec (dllexport) int MSIL_EnumSpectrometers (SPECTROMETER_ID * spectrometers);

    where the only parameter is a pointer to:

    typedef struct
    {
    tank model [32];
    series char [32];
    Channel int;
    } SPECTROMETER_ID;

    Before LabVIEW 2011 I would use a CIN allocate the memory and call the function, but in LabVIEW 2011, the INC has been deleted and I have to use a library function node call instead. When I go to set the parameter, it seems that I need to set the type to "Adapt to the Type" and data for 'Pointer to data in table' Format, then pass an initialized array of SPECTROMETER_ID with the many elements he so the DLL can fill the table with data. (See the attached picture.) When I do that, however, it blocks LabVIEW desktop.  I guess it is because the DLL is corrupting the memory space of LabVIEW, but I don't see why, because I'm basically passing in a void pointer to an array initialized in the right size. Note that the first node of NSI returns the number of elements required in the table.  Anyone have any idea what I'm doing wrong here?

    In LabVIEW, when a table is in a cluster - cluster don't detain actually table but sort of a pointer that points to the table. If you need the cluster to contain 32 to 32 Add to the cluster. See the VI attached to how it's supposed to be done.

  • Can I call a custom outdoor function?

    Can I call a custom outdoor function?

    For example

    //______________________

    var myComp = app.project.activeItem;

    createComps();

    createSolids();

    RenderItems();

    //______________________________

    but these functions are written separately in the current directory .jsx format?

    As a library?

    #include <>?

    You gave the answer to your question: you can use #include 'path/to/file/to/include.jsx '.

    And the path can be absolute or relative to the current folder.

    See the JavaScript ToolGuide for this (it does not appear in the AE script guide since it is common to all applications).

    You can also use $.evalFile (pathToFile), which has more or less the same effect I think.

    Xavier.

  • Can I call sql * scripts of charger from Oracle DBMS_SCHEDULER jobs

    Hi all

    Can I call oracle SQL * Loader work DBMS_SCHEDULER scripts.

    Appreciate your suggestions on this.

    Thank you
    Madhu K.

    Can I call oracle SQL * Loader work DBMS_SCHEDULER scripts.

    DBMS_SCHEDULER can invoke OS script.
    Exactly what the script does it to you.
    You should know that the script will have probably environmental & OS permission issues.

  • How can I call a function of server by a button?

    Hello world...

    I have a problem...

    I need to call a server function by pressing a button. I put the requirement on the label...

    This is my script:

    writeBtn1.addEventListener (MouseEvent.CLICK, writeFile1);

    private void writeFile1 (e:MouseEvent = null): void
    {
    checkBtn = (writeBtn1.label == 'Confirmation' & & textInput1.text! = "");  my State...
    If (checkBtn)
    {
    NC. Call ("WriteNow", null, textInput1.text + "\n");
    writeBtn1.label = "done";
    }
    }

    I would like to call the function on the release of the button...

    Can someone help me?

    Please...

    Emiliano.

    use:

    writeBtn1.addEventListener (MouseEvent.CLICK, writeFile1);

    writeBtn2.addEventListener (MouseEvent.CLICK, writeFile1);

    writeBtn3.addEventListener (MouseEvent.CLICK, writeFile1);

    private void writeFile1 (e:MouseEvent = null): void
    {
    {if(e.currentTarget==writeBtn1)}

    No matter what

    } else {if(e.currentTarget==writeBtn2)

    do whateverelese

    } else {}

    It's writeBtn3

    }

    }

  • How can I call two functions in the HTML Form element attributes

    Hello

    I want the same value in the text field two, when I select the value to select the list then the value with a number increment should be two text field.
    I use both java script

    < script >
    function sumItems() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    return 0;
    }
    $x('P19_LAST_END_YR').value = getVal ('P19_LAST_STR_YR') + 1;
    }
    < /script >


    < script >
    function per1Items() {}
    function getVal (item) {}
    If ($x (point) .value! = "")
    Return parseFloat ($x (item) .value);
    on the other
    return 0;
    }
    $x('P19_LAST_END_YR').value = getVal ('P19_START_YEAR') + 1;
    }
    < /script >


    now how can I call function onchange two attributes of the element in the HTML form for the discount:
    ' onChange = "javascript:sumItems()" onChange ="javascript:per1Items().

    Hello

    Try

    onchange="sumItems();per1Items();"
    

    BR, Jari

  • ADF: Can I call java method clsss javascript function in the ADF?

    Hello

    I want to call the javascript function in the Java class method, it is possible in the ADF? If Yes, how?

    or I need to use Java 6 function directely?

    Kind regards
    Deepak
    private void writeJavaScriptToClient(String script)
    {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
    erks.addScript(fctx, script);
    }
    

    its use

    StringBuilder script = new StringBuilder();
    script.append( "var popup = AdfPage.PAGE.findComponentByAbsoluteId('p1');");
    script.append("if(popup != null){"); script.append("popup.show();"); script.append("}");
    writeJavaScriptToClient(script.toString());
    

    Timo

  • How can I call 3 buttons to the same server function with 3 different return URL?

    Hello everyone...

    I have a question...

    Can I use the same function side server to send to guests 3 different swfURL whereby key pressed from one of them?

    If the answer is positive... How can I do it?

    Please, help me...

    Emiliano.

    on the client side

    import flash.net.Responder;

    var responder: responder = new responder (function name);

  • Why we need to create the package instead of procedure or function in Oracle

    Hello

    Recently, I attended an interview, they asked,
    why we must create the package instead of procedure or function in oracle. Is a specific advantage, if we create together.
    I'm not sure. can u tell me please someone.

    Thank you and best regards,
    Sanjeev.

    Hello

    A part of the oracle documentation.

    What is a PL/SQL Package?
    A package is a schema object which includes subroutines, variables, and logically related PL/SQL types. Packages have two parts: a specification (spec) and a body. Sometimes, the body is unnecessary. The specification is the interface to the package. It declares the types, variables, constants, exceptions, cursors, and subprograms that can be referenced from outside the package. The body defines queries for the sliders and the code for the subprogrammes.

    Benefits of the PL/SQL Packages
    Packages have a long history in software engineering, offering important characteristics for a reliable, maintainable, and reusable code, often in team for large systems development efforts.

    Modularity

    Packages allow you to logically encapsulate Associates types, elements, and subroutines in a module named PL/SQL. Each package is easy to understand, and the interfaces between packages are simple, clear and well defined. This facilitates the development of applications.

    Easier application design

    When you design an application, all you need initially is the interface information in the package specification. You can code and compile a spec without his body. Stored subprograms that reference the package can then be compiled as well. You should not set the package body entirely until you are ready to complete the application.

    Information masking

    With packages, you can specify which types, elements, and subprogrammes are (and accessible) public or private (hidden and inaccessible). For example, if a package contains four subprogrammes, three can be public and one private. The package hides the implementation of the subprogramme private so that only the package (not your application) is affected if the application changes. This simplifies maintenance and improvement. Also, by hiding the implementation details of the users, you protect the integrity of the packaging.

    Feature added

    Sliders and packed public variables persist for the lifetime of a session. They can be shared by all the subprogrammes that are running in the environment. They allow you to manage data in any of the transactions without storing in the database.

    Best performance

    When you call a subprogram packaged for the first time, the whole package is loaded into memory. Subsequent calls to related subprograms in package require no disk i/o.

    Packets stop cascading dependencies and avoid an unnecessary recompilation. For example, if you change the body of a packaged function, Oracle does not recompile other routines that call the function; These routines only depend on parameters and return value that are declared in the specification, so they are recompiled only if the specification changes.

Maybe you are looking for

  • take a picture

    Hi everyone, I need help, how can I take a picture with the camera on BB? I tried some codes but does not work Thank you.

  • Java, recharge it or just leave it?

    Greetings my friends more excellently smart,. Well now children gather around it's time for the show ' TIFF ' confused Again! Episode 'Java' today and we not Talkin ' coffee. Okie dokie last week there was a story on the news on the "Java". They said

  • exp/expdp of 32-bit, and then imp/impdp 9i to 11 GR 2 64-bit

    Hi allThis process is supported?exp/expdp of 32-bit, and then imp/impdp 9i to 11 GR 2 64-bitThank you very muchJC

  • Backup of Shared Services registry

    Hi allWhen it means a backup of registry of Shared Services, we can do the LCM export of metadata from deployment-> law of registry of SSP?And I also back to the top of the discharge of the Oracle.Everything I need to make a backup of.Thanks for your

  • Adobe stock mossa di immagini più what che dovrei avere

    Buongiorno,in December 2015, avevo reported a problem with the Adobe stock di immagini (labor-intensive col pacchetto cloud creative completo, labor-intensive one beginning July 2015)Che mi non assegnate ogni mese, don't mancavano, poi attraverso aut