How to execute a packaged function from within DML

Hi
can someone explain in how many ways can we execute a packaged function from within a DML statement.
examples will help.
Thanks

Hi,
There's no difference between using functions in DML and using functions in any other SQL statement. Almost any place where a literal is allowed, you can have any kind of expression, including a an expression involving one or more functions.
For example, in
UPDATE  table_x
SET     column_a = 0
WHERE   column_b > SYSDATE;You could use functions instead of 0, column_b, or SYSDATE. (Actually, SYSDATE is a function.) You can not use functions instead of table_x or column_a (since it is to the left of the "=" sign).

Similar Messages

  • How to execute a Perl program from within a Java prog

    How do I execute a Perl program from within a Java program.
    Lets say the Perl program that I want to execute is 'abc'. Now, 'abc' requires some input that I want to give it from within the Java program. How do I do it?
    And finally, how do I execute that Perl program from within the Java program.
    If I execute the Perl program alone then I do it in the following way -
    perl abc inp1 inp2 inp3
    where inp1, inp2, inp3 are inputs to the Perl program. I will not be able to change or modify the coding of the Perl program - 'abc' as I do not have access to its code. Its a kind of an application whose usual method of execution is in the above shown way. So, how do I execute 'abc' from within a Java program.

    what part of don't crosspost, don't you understand?
    http://forum.java.sun.com/thread.jsp?forum=4&thread=427193

  • How to execute the package generated from Warehousebuilder ??

    Hi,
    I am very new to OWB, i have created the mapping and i want to write a oracle job to run the mapping, Can i explicitly execute the Package generated by passing the parameters required,
    I have actually created like following,
    DECLARE
    p_status VARCHAR2 (200);
    p_deptno NUMBER;
    p_max_no_of_errors VARCHAR2 (200);
    p_commit_frequency VARCHAR2 (200);
    p_operating_mode VARCHAR2 (200);
    p_bulk_size VARCHAR2 (200);
    p_audit_level VARCHAR2 (200);
    p_purge_group VARCHAR2 (200);
    BEGIN
    p_deptno := 10;
    p_max_no_of_errors := NULL;
    p_commit_frequency := NULL;
    p_operating_mode := NULL;
    p_bulk_size := NULL;
    p_audit_level := NULL;
    p_purge_group := NULL;
    map_filter_parameter.main (p_status => p_status,
    p_deptno => p_deptno,
    p_max_no_of_errors => p_max_no_of_errors,
    p_commit_frequency => p_commit_frequency,
    p_operating_mode => p_operating_mode,
    p_bulk_size => p_bulk_size,
    p_audit_level => p_audit_level,
    p_purge_group => p_purge_group
    DBMS_OUTPUT.put_line ('P_STATUS = ' || p_status);
    END;
    I am actually following error,
    Line: ----
    Connecting to the database bl.
    ORA-20013: The workspace has not been set. Please call wb_workspace_management.set_workspace procedure to set workspace first.
    ORA-06512: at "OWBSYS.WB_WORKSPACE_MANAGEMENT", line 1356
    ORA-06512: at "OWBSYS.WB_WORKSPACE_MANAGEMENT", line 1387
    ORA-06512: at "OWBSYS.WB_RTI_UTIL", line 102
    ORA-06512: at "OWBSYS.WB_RT_MAPAUDIT_UTIL", line 1020
    ORA-06512: at "BL.MAP_FILTER_PARAMETER", line 2798
    ORA-06512: at line 19
    Process exited.
    Disconnecting from the database bl.
    I am not able to connect OWBSYS to see whats going on with OWBSYS.WB_WORKSPACE_MANAGEMENT as well.
    Please suggest
    Regards,
    Ashoka BL

    Hi Nawneet,
    I tried like the following and getting the results,I searched in the forum to do this,
    DECLARE
    p_status VARCHAR2 (200);
    p_deptno NUMBER;
    p_max_no_of_errors VARCHAR2 (200);
    p_commit_frequency VARCHAR2 (200);
    p_operating_mode VARCHAR2 (200);
    p_bulk_size VARCHAR2 (200);
    p_audit_level VARCHAR2 (200);
    p_purge_group VARCHAR2 (200);
    BEGIN
    p_deptno := 20;
    p_max_no_of_errors := NULL;
    p_commit_frequency := NULL;
    p_operating_mode := NULL;
    p_bulk_size := NULL;
    p_audit_level := NULL;
    p_purge_group := NULL;
    owbsys.wb_workspace_management.set_workspace('ASHOK_WORKSPACE','ASHOK_BL');
    map_filter_parameter.main (p_status => p_status,
    p_deptno => p_deptno,
    p_max_no_of_errors => p_max_no_of_errors,
    p_commit_frequency => p_commit_frequency,
    p_operating_mode => p_operating_mode,
    p_bulk_size => p_bulk_size,
    p_audit_level => p_audit_level,
    p_purge_group => p_purge_group
    DBMS_OUTPUT.put_line ('P_STATUS = ' || p_status);
    END;
    Do you please let me know what are these,
    'PLSQLMAP','CUSTOMER_MAP' == WorkSpace_Name and User_Name ??
    Regards,
    Ashoka BL
    Edited by: user7348859 on May 26, 2009 5:07 AM

  • How to write custom messages to Data Manager package log from within SSIS?

    Just wonder in BPC 7.0/7.5 MS how do you write custom messages to Data Manager package log from within SSIS?  I mean I want to log output of specific custom tasks (non-BPC) in SSIS control flow to the resultant BPC package log created when running SSIS package in Data Manager.  Can this be done in a Script Task or some other way?  Not much documentation out there on this.
    Thanks,
    Brian

    Hi Brian
    In order to achieve what you want, it can get tricky in your package, ultimately It would depend on the task, for example if you had an execute SQL task, you could use a RAISEERROR command in your SQL statement and BPC would return the error message that you specified.
    If you had other tasks, then it would be a bit more tricky, you would have to have custom messages based on event handlers.
    Please see below links for examples :
    [Custom messages for logging|http://msdn.microsoft.com/en-us/library/ms345174.aspx]
    [Custom Logging Using Event Handlers |http://consultingblogs.emc.com/jamiethomson/archive/2005/06/11/SSIS_3A00_-Custom-Logging-Using-Event-Handlers.aspx]
    Hope this helps
    Kind Regards
    Daniel

  • Possibility to execute Acrobat Pro's "Combine files into PDF" function from within SAP?

    Good day.
    Presently, a company uses Acrobat Pro to manually combine files such as *.pdf, *.jpg, *.doc, which have been downloaded from SAP's Document Management System, into one pdf file. I would like to know if it is possible to automatically execute Acrobat Pro's "Combine files into PDF" function from within SAP (ECC 6.0) application system. I'm wondering if this could be achieved from a program via OLE (Object Linking and Embedding) or RFC (remote function call).
    Thanks in advance for your thoughts and inputs.

    Yes, you can combine PDF files via IAC/COM methods.

  • How do i call a Function from another Function ?

    When i press a button, i want a series of functions to execute one after another (they contain tweens, but its irrelevant), each of them waiting for the previous to be completed. I want to put the series of functions inside one function, so i can call just this function to execute all the others. The animations are working fine, but i dont know how call Functions from within another function. Also it would be necessary each function to wait until the previous has completed, to execute. Here is a clear example of what i need to do:
    boton.onPress = animate ;
    Function animate () {
         animation1 (onComplete: animation2);
         animation2 (onComplete: animation3);
         animation3 ;
    Function animation1 () { Tween 1};
    Function animation2 () { Tween 2};
    Function animation3 () { Tween 3};
    any suggestions ?

    I'd do something like this:
    boton.onPress = animation1 ;
    Function animation1 () {
         var Tween1 = new Tween();
        Tween1.onComplete =  animation2;
    Function animation2 () {
         var Tween2 = new Tween();
         Tween2.onComplete = animation3;
    Function animation3 () {
         var Tween3 = new Tween();

  • Using 'export -f FUNCTION' from within a script doesn't work

    Why doesn't the 'export -f FUNCTION' work as expected in the following:
    #!/bin/bash
    target="$1"
    [[ -z "$target" ]] && echo "No target specified." && exit 1
    work() {
    bsdtar -xOf "$target" .PKGINFO | egrep -w 'pkgname|arch|pkgdesc|group|conflict|depend|replaces' | sed -e 's/pkgname/\npkgname/' >> /scratch/pkgs.log
    export -f work
    find /scratch/repo -name "$target*.pkg.tar.xz" | parallel work
    It errors out when called:
    % ~/bin/repo/check_pkgs broadcom
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work
    zsh:1: command not found: do_work

    moetunes wrote:The command you are exporting is called work. The command it fails on is do_work
    That was a copy/paste error based on me trying multiple scripts.  Sorry about the confusion.
    % ./test linux
    zsh:1: command not found: work
    zsh:1: command not found: work
    falconindy wrote:
    It's also the wrong solution to be exporting functions...
    Yay for ineffective crossposting... https://bbs.archlinux.org/viewtopic.php?id=153461
    Exporting functions is recommended in the parallel man page.
    The command must be an executable, a script, a composed command, or a function. If it is a function you need to export -f the function first. An alias will, however, not work (see why http://www.perlmonks.org/index.pl?node_id=484296).
    Also, how is this a cross post?  The post you referenced is about parsing input, this one is about calling a function from within the parent script.
    Awebb wrote:Why does zsh report a problem with a bash script?
    No idea
    Last edited by graysky (2012-11-24 14:35:15)

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • How to Execute SSIS package through MySQL Procedure

    Hi Everyone,
    How to Execute SSIS package from MySQL Stored Procedure.
    Please share your suggestions on this.
    Regards,
    Vaishu

    I am not sure whether you have SSIS license version installed in the system where MYSQL is there. In order to run SSIS package we need to have DTEXEC executable file and it comes with SSIS license version.
    An SSIS package can be executed from command prompt as,
    C:\>dtexec /f E:\package.dtsx
    I am not expert in MYSQL however in TSQL we can run dos command or scripting language such as vbscript.
    Similarly you need to check in MYSQL. This is MSSQL Server forum.
    Refer
    http://www.ehow.com/how_8789576_call-ssis-package-vbscript.html
    http://www.mssqltips.com/sqlservertip/1775/different-ways-to-execute-a-sql-server-ssis-package/
    Regards, RSingh

  • How do I call a function from an Itemrenderer?

    Hi, Im new in flex and I wonder if I can call a function from within an AdvancedDataGridRendererProvider
    for example:
      <mx:AdvancedDataGrid>
        <mx:columns>
            <mx:AdvancedDataGridColumn  dataField="id" />
        </mx:columns>  
        <mx:rendererProviders> 
            <mx:AdvancedDataGridRendererProvider 
                dataField="detail"
                renderer="components.myRendererProvider"  
                columnIndex="2" 
                depth="2"                     
                />     
        </mx:rendererProviders>       
      </mx:AdvancedDataGrid>
    <mx:Script>
         <![CDATA[
              public function outerFunction(){
        ]]>
    </mx:Script>
    myRendererProvider
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml" paddingLeft="10" paddingRight="2" horizontalGap="2" paddingTop="0">
    <mx:Script>
        <![CDATA[   
         public function callOuterFunction( ){
              how do I call the outerFunction() from here?
        ]]>
    </mx:Script>
        <mx:LinkButton fontSize="13"  fontWeight="bold" click="callOuterFunction( )" label="label"  />
    </mx:HBox>
    thank you in advance.

    There are two ways to call a function from within an ItemRenderer. One way is to dispatch an event from your ItemRenderer and listen for the event in your main application. This approach has the advantage of creating loosely coupled code which is eaiser to maintain and extend if needed, but it takes a bit more work to set things up than using the second aproach lised below. You could also create a custom event to have greater control over what data is sent with the event.
    private function callOuter():void {
         this.dispatchEvent(new MouseEvent());
    The other approach is to call the main application by using parentDocument.
    private function callOuter():void {
         parentDocument.handleItemRenderer();
    Chris

  • How to know the packages,functions,triggers owned by schema

    I got the script to find the tables,columns and indexes belonged to a schema
    how to find the packages,functions triggers owned by a schema.
    I need to compare schema of PROD with UAT
    Any help will be appreciated

    is it possible to find the source of all those
    objects in a single scriptWhat do you mean?
    user_source will give the script?Yes.
    You can get script more easily with DBMS_METADATA
    SQL> drop FUNCTION "HR"."F11";
    Function dropped.
    SQL> CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;  2    3    4    5    6    7
      8  /
    Function created.
    SQL> set pagesize 0
    SQL> set long 90000
    SQL> select DBMS_METADATA.GET_DDL (
    'FUNCTION',
    object_name,
    'HR')
    FROM    all_objects
    WHERE owner = 'HR'
    AND object_type ='FUNCTION'  3    4    5    6    7
      8  /
      CREATE OR REPLACE FUNCTION "HR"."F11" return varchar2
    as
    v_date varchar2(1000);
    begin
    select to_char(sysdate,'mmddyyyy') into v_date from dual;
    return v_date;
    end;
    Is there any script to identify source for all those
    objects

  • Executing a Perl program from within a Java prog

    How do I execute a Perl program from within a Java program.
    Lets say that the Perl program that I want to execute is 'abc'.'abc' requires some input that I want to give from within the java program. How do I do that? Then I want to execute the Perl program from within the Java prog. How do I do it?

    don't crosspost.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=427211&tstart=0&trange=100

  • How to call a SQL function from an XSL expression

    Hi
    In R12, in Payroll Deposit adivce/Check writer, We need to sort the earnings tag <AC_Earnings> in to two different categories as regular and other earnings. In the DB and form level of element defintiion we have a DFF which differentiates between the two kinds of earnings. But the seeded XML that is gerneated by the check writer does not have this field.
    The seeded template displays all the earnings in one column. How can we achieve this in the template without modifying the seeded XML.
    The one approach i have is to write a function and based on the return value sort the data. For this I need to know :
    1) How to call a SQL function from an XSL expression that is allowed in BI template.
    If anyone ahs faced similar requirements please share your approach.
    Thanks
    Srimathi

    Thank u..
    but i'd seen that link wen i searched in google..
    Is it possible without using any 3rd party JARs and all?
    and more importantly plz tell me what should be preferred way to call a javascript function?
    Do it using addLoadEvent() or Windows.Load etc
    OR
    Call it thru Xsl? (I donno how to do dis)
    Thanks in Advance..
    Edited by: ranjjose on Jun 3, 2008 8:21 AM

  • How to call a Javascript function from backing bean without any event

    Hi,
    Someone knows how to call a Javascript function from backing bean without any event ?
    thanks

    Please review the following thread:
    ADF Faces call javascript
    Luis.

  • How to execute unix command line from cocoa?

    how to execute unix command line from cocoa?
    for example, if I want to call "ping" from cocoa, how should I do it? and how can I obtain the return value?
    thank you.
    Power G5 Quad Mac OS X (10.4.3)

    The following article may also help:
    http://cocoadevcentral.com/articles/000025.php
    Mihalis.
    Dual G5 @ 2GHz   Mac OS X (10.4.6)  

Maybe you are looking for