Syntax for APEX_PLSQL_JOB.SUBMIT_PROCESS with an OUT parameter

Hi All,
I am using APEX_PLSQL_JOB.SUBMIT_PROCESS and calling a procedure that has both an IN and an OUT parameter.
The IN parameter works fine; I am able to call my procedure from APEX and pass it the :APP_JOB item as the IN parameter. The OUT parameter I can't get working. I can call my procedure from a different block in SqlDeveloper and everything works, so I'm confident that my procedure code is correct. I just can't get the OUT parameter returned via APEX.
This is the plsql code that I'm calling from an APEX dynamic action:
DECLARE
  l_sql      VARCHAR2(4000);
  l_instance VARCHAR2(30);
   l_job number;
  l_rows_processed number;
BEGIN
l_instance := :P9_INSTANCE;
  l_sql      := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); END;';
  l_job      := APEX_PLSQL_JOB.SUBMIT_PROCESS( p_sql => l_sql, p_status => 'Background process submitted');
l_rows_processed := :F103_ROWS_PROCESSED;
insert into gse_lng_jobs (instance, job_id, rows_processed) values (l_instance, l_job, l_rows_processed);
COMMIT;
END; My procedure is created as:
create or replace
procedure UPDATE_TL_TABLES_1 (l_app_job IN number, l_rows_processed OUT number)
IS......Again, this works fine from SqlDeveloper. Can anyone suggest the proper plsql code? I've tried this using a page item, a system item etc. and no luck. I first tried just passing my procedure a local variable like l_rows_processed, but the procedure wouldn't even run, so I'm assuming the API needs an actual APEX item but I'm out of ideas here.
thanks in advance,
john

That's not going to work because the job hasn't run yet when you perform the insert. So :F103_ROWS_PROCESSED wont contain anything useful.
Why don't you try performing the insert as part of the job, e.g.
l_sql := 'BEGIN update_tl_tables_1(:APP_JOB, :F103_ROWS_PROCESSED); insert into gse_lng_jobs (instance, job_id, rows_processed) values ('''||l_instance||''', '||l_job||', :F103_ROWS_PROCESSED); END;';
...something like that.

Similar Messages

  • Syntax for taking export with 'Query' parameter

    Hi all
    Please help me regarding syntax for taking export with query parameter

    Hi
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where empno=10'
    exp file=d:\exp.dmp log=d:\exp.log tables=scott.emp query='where ename='''SCOTT''Salman

  • Methods of OLE-objects with IN OUT parameter

    How can I invoke a method of an OLE-object with IN OUT parameter?
    Trying
    obj := CREATE_OLEOBJ(localobject VARCHAR2, TRUE);
    INIT_OLEARGS (n+1);
    ADD_OLEARG (newvar_1 NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
    ADD_OLEARG (newvar_n NUMBER/VARCHAR2, vtype VT_TYPE := VT_R8/VT_BSTR);
    CALL_OLE(obj OLEOBJ, memberid PLS_INTEGER);
    newvar_x := GET_OLEARG_<type>(x);
    I get the old value of newvar_x, but it must be changed
    Methods with only IN parameter work fine.
    I've tried this with OLE2-package, but it hasn't worked too
    Can somebody help
    Thanks

    Hi Gurus
    I know this is very old post.
    but dose anybody know the answer.
    thanks

  • How can I Create function with an  out Parameter

    how all
    how can I Create function with an out Parameter
    I try to create it it sucess but how can I CALL it , it give me error
    please I want A simple example
    thanks

    3rd post on same question by same user :
    Re: how can I Create function with an  out Parameter
    how can I Create function with an  out Parameter

  • How to call a oracle procedure with in/out parameter frm unix shell script?

    Hi,
    I need to call an oracle stored procedure from unix script. The procedure has 1 input parameter and 2 output parameter. Please send me the syntax for the same. Based on the output values of procedure, I have to execute some more commands in unix script.
    Thanks and regards
    A

    An example :
    TEST@db102 SQL> select ename, job from emp
      2  where empno = 7902;
    ENAME      JOB
    FORD       ANALYST
    TEST@db102 SQL> create or replace procedure show_emp (
      2     v_empno in      number,
      3     v_ename out     varchar2,
      4     v_job   out     varchar2 )
      5  is
      6  begin
      7     select ename, job into v_ename, v_job
      8     from emp
      9     where empno = v_empno;
    10  end;
    TEST@db102 SQL> /
    Procedure created.
    TEST@db102 SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    [ora102 work db102]$ IN=7902
    [ora102 work db102]$ set `sqlplus -s test/test@db102 << !
    var out1 varchar2(30);
    var out2 varchar2(30);
    set pages 0
    set feed off
    exec show_emp($IN,:out1,:out2);
    print
    exit
    `[ora102 work db102]$ echo $1 $2
    FORD ANALYST
    [ora102 work db102]$                           

  • Creating a job for a procedure with an input parameter

    Hi,
    I want to create a job for a procedure ( sp_proc ) with a input parameter.
    The input parameter is a date value.
    As per the syntax for dbms_job.submit procedure;
    dbms_job.submit (
    job IN BINARY_INTEGER,
    what IN VARCHAR2,
    next_date IN DATE,
    interval IN VARCHAR2 DEFAULT 'NULL',
    no_parse IN BOOLEAN DEFAULT FALSE);
    How should the procedure be declared in the 'what' parameter of the dbms_job.submit procedure ?
    Please guide.
    Thanks.

    Hi,
    You are wright, I have found this thread [DBMS_JOB -- how to pass parameters to the job|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:351033761220].
    Regards,

  • Errer when, Call from java to pl sql procedure with table out parameter

    Hi ,
    Please help me ? It's urgent for me .....
    My Oracle Code is like this ,
    CREATE TABLE TEST_TABLE ( DATE1 DATE, VALUE_EXAMPLE VARCHAR2(20 BYTE), VALUE2_EXAMPLE VARCHAR2(20 BYTE), VALUE3_EXAMPLE NUMBER ); CREATE OR REPLACE TYPE TONERECORDTEST AS OBJECT ( DATE1 DATE, VALUE_EXAMPLE VARCHAR2(20), VALUE2_EXAMPLE VARCHAR2(20), VALUE3_EXAMPLE NUMBER ); CREATE OR REPLACE TYPE TTESTTABLE IS TABLE OF TONERECORDTEST; CREATE OR REPLACE PACKAGE test_collection_procedures AS PROCEDURE testCallProcedureFromJava(start_time IN DATE, end_time IN DATE, table_data OUT TTesttable); END test_collection_procedures; / CREATE OR REPLACE PACKAGE BODY test_collection_procedures AS PROCEDURE testCallProcedureFromJava(start_time IN DATE, end_time IN DATE, table_data OUT TTesttable) IS BEGIN SELECT TONERECORDTEST(date1, value_example, value2_example, value3_example) BULK COLLECT INTO table_data FROM TEST_TABLE WHERE DATE1>=start_time AND DATE1<=end_time; END testCallProcedureFromJava; END test_collection_procedures;
    And my Java Code is like
    import java.sql.Connection; import java.sql.DriverManager; import oracle.jdbc.OracleCallableStatement; import oracle.jdbc.OracleTypes; import oracle.sql.ARRAY; import oracle.sql.ArrayDescriptor; import oracle.sql.STRUCT; import oracle.sql.StructDescriptor; public class testPLCollectionType { public static void main(java.lang.String[] args) { try{ //Load the driver Class.forName ("oracle.jdbc.driver.OracleDriver"); // Connect to the database Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@serverbd:1521:squema1","user", "password"); // First, declare the Object arrays that will store the data (for TONERECORDTEST OBJECT TYPE) Object [] p2recobj; Object [] p3recobj; Object [] p4recobj; // Declare the Object Arrays to hold the STRUCTS (for TTESTTABLE TYPE) Object [] p2arrobj; // Declare two descriptors, one for the ARRAY TYPE // and one for the OBJECT TYPE. StructDescriptor desc1=StructDescriptor.createDescriptor("TONERECORDTEST",conn); ArrayDescriptor desc2=ArrayDescriptor.createDescriptor("TTESTTABLE",conn); // Set up the ARRAY object. ARRAY p2arr; // Declare the callable statement. // This must be of type OracleCallableStatement. OracleCallableStatement ocs = (OracleCallableStatement)conn.prepareCall("{call test_collection_procedures.testCallProcedureFromJa va(?,?,?)}"); // Declare IN parameters. Realize that are 2 DATE TYPE!!! Maybe your could change with setDATE ocs.setString(1,"01-JAN-04"); ocs.setString(2,"10-JAN-05"); // Register OUT parameter ocs.registerOutParameter(3,OracleTypes.ARRAY,"TTESTTABLE"); // Execute the procedure ocs.execute(); // Associate the returned arrays with the ARRAY objects. p2arr = ocs.getARRAY(3); // Get the data back into the data arrays. //p1arrobj = (Object [])p1arr.getArray(); p2arrobj = (Object [])p2arr.getArray(); System.out.println("Number of rows="+p2arrobj.length); System.out.println("Printing results..."); for (int i=0; i<p2arrobj.length; i++){ Object [] piarrobj = ((STRUCT)p2arrobj).getAttributes();
    System.out.println();
    System.out.print("Row "+i);
    for (int j=0; j<4; j++){
    System.out.print("|"+piarrobj[j]);
    }catch (Exception ex){
    System.out.println("Exception-->"+ex.getMessage());
    Actually when i running the java program it is showing error
    Exception-->ORA-06550: line 1, column 58:
    PLS-00103: Encountered the symbol "VA" when expecting one of the following:
    := . ( @ % ;
    The symbol ":=" was substituted for "VA" to continue.
      I am not getting the error .Please help me out Dhabas Edited by: Dhabas on Jan 12, 2009 3:49 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    // Declare the callable statement.
    // This must be of type OracleCallableStatement.
    ..."{call test_collection_procedures.testCallProcedureFromJa va(?,?,?)}");Looks like Ja divorced va.

  • Toplink support for stored procedure with 2 OUT  REF CURSOR ?

    Can Toplink StoredProcedureCall be used with Oracle PLSql procedure with 2 OUT parameters. Parameter type is Ref Cursor (Oracle PLSQL resulset)
    Regards

    In a TopLink StoredProcedureCall using an OUT CURSOR the cursor is assumed to map to the result set for the TopLink query.
    For example if you had a stored procedure READ_ALL_EMP that returned a out cursor of EMP rows, you could use that procedure in a TopLink mapped Employee class mapped to the EMP table and use the stored procedure in a ReadAllQuery for the Employee class.
    If the procedure does not return data that maps to objects, you can use a DataReadQuery to access the data. The out cursor would be returned as a Vector of DatabaseRows that contain the data from the cursor rows.
    If the procedures data is complex and does not map to objects, it may be better to access the procedure directly through JDBC.

  • Graphics card for 2 monitors with TV out function

    I would like to use my H500s as the centerpiece of a Media Center. To do this it seems that  I need a new graphics card that will support at least 2 TVs/Monitors (3 would be even better). The first one is easy, my newer 50 inch TV hooks right up, but my older 33 inch TV is the problem. 
    From shopping around it looks like I need a card with either an S-Link along with a VGA or 2 VGAs and an adapter. Either way, the card needs to have a TV out function. It looks like I will also need to upgrade the power supply but that is a minor issue. 
    If anyone can suggest a card, or somewhere that I might find more information , I would be very grateful. Thanks in advance for any help with this.

    The card you have should work if you get one ADC to DVI adapter
    <http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wo/2.RSLID?mco= E1A673E1&nplm=T2774G%2FA>
    If you need more power you may be able to find one of the original upgrades used:
    ATI Radeon 9600 XT with 128MB of DDR SDRAM, DVI and ADC ports
    ATI Radeon 9800 XT with 256MB of DDR SDRAM, DVI and ADC ports (occupies AGP slot and adjacent PCI slot)
    NVIDIA GeForce 6800 GT DDL with 256MB GDDR3 SDRAM, two dual-link DVI ports (occupies AGP slot and adjacent PCI slot)
    NVIDIA GeForce 6800 Ultra DDL with 256MB GDDR3 SDRAM, two dual-link DVI ports (occupies AGP slot and adjacent PCI slot)
    New, the best is probably the Radeon® X800 XT Mac Edition
    <http://www.ati.com/products/radeonx800/radeonX800xtme/index.html>

  • Performance issue with using out parameter sys_refcursor

    Hello,
    I'm using Oracle 10g, with ODP.Net in a C# application.
    I'm using about 10 stored procedures, each having one out parameter of sys_refcursor type. when I use one function in C# and call these 10 sp's, it takes about 78ms to excute the function.
    Now to improve the performance, I created one SP with 10 output parameters of sys_refcursor type. and i just call this one sp. the time taken has increased , not it takes abt 95ms.
    is this the right approach or how can we improve the performance by using sys_refcursor.
    please suggest, it is urgent, i'm stuck up with this issue.
    thanks
    shruti

    With 78ms and 95ms are you talking about milliseconds or minutes? If it's milliseconds then what's the problem and does it really matter if there is a difference of 17 milliseconds as that could just be caused by network traffic or something. If you're talking minutes, then we would need more information about what you are attempting to do, what tables and processing is going on, what indexes you have etc.
    Query optimisation tips can be found on this thread.. When your query takes too long ....
    Without more information we can't really tell what's happening.

  • ASP syntax for Oracle update with parameters

    I am trying to do update on aspx page (not with code behind).  I can perform update without parameters but I get ORA-0136 illegal variable name/number when I try to use a parameter in where clause.  I added the parameter with tag - <asp:Parameter>

    ASPX page is below.
    The issue is the UPDATE for last Gridview (Gridview3).  If I put a literal in the WHERE clause (i.e., "...WHERE ITEMNUM = '0001'"", then the update works.  So, it appears the issue is how I code the parameter.
    Thanks...
    ==============================================
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm4.aspx.cs" Inherits="OraWeb1.WebForm4" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
        vendor quote status
            <br />
            <asp:Label ID="Label1" runat="server"></asp:Label>
            <br />
            <br />
            <asp:Label ID="Label2" runat="server"></asp:Label>
            <br />
            <br />
        </div>
        <div>
            rfqvendordetail
            <asp:GridView ID="GridView1" runat="server" Width="681px" DataSourceID="RFQVendorDetail" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical">
                <AlternatingRowStyle BackColor="#DCDCDC" />
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#0000A9" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#000065" />
            </asp:GridView>
            <asp:SqlDataSource ID="RFQVendorDetail" runat="server" ConnectionString="<%$ ConnectionStrings:OraContracts %>" ProviderName="<%$ ConnectionStrings:OraContracts.ProviderName %>" SelectCommand="SELECT &quot;ITEMNUM&quot;, &quot;MFRNUM&quot;, &quot;DESCRIPTION&quot;, &quot;UOM&quot;, &quot;QTY&quot;, &quot;UNITPRICE&quot;, &quot;TOTALPRICE&quot; FROM &quot;RFQVENDORDETAILS&quot; WHERE ((&quot;VENDORID&quot; = :VENDORID) AND (&quot;RFQID&quot; = :RFQID))">
                <SelectParameters>
                    <asp:SessionParameter Name="VENDORID" SessionField="vendorid" Type="String" />
                    <asp:SessionParameter Name="RFQID" SessionField="RFQID" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <br />
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="testrows" Width="526px">
                <AlternatingRowStyle BackColor="#DCDCDC" />
                <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
                <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
                <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
                <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
                <SortedAscendingCellStyle BackColor="#F1F1F1" />
                <SortedAscendingHeaderStyle BackColor="#0000A9" />
                <SortedDescendingCellStyle BackColor="#CAC9C9" />
                <SortedDescendingHeaderStyle BackColor="#000065" />
                <Columns>
                    <asp:BoundField DataField="RFQID" HeaderText="RFQID" SortExpression="RFQID" />
                    <asp:BoundField DataField="ITEMNUM" HeaderText="ITEMNUM" SortExpression="ITEMNUM" />
                    <asp:BoundField DataField="QTY" HeaderText="QTY" SortExpression="QTY" />
                    <asp:BoundField DataField="UOM" HeaderText="UOM" SortExpression="UOM" />
                    <asp:TemplateField HeaderText="UNITPRICE" SortExpression="UNITPRICE">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("UNITPRICE") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("UNITPRICE") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="testrows" runat="server" ConnectionString="<%$ ConnectionStrings:OraContracts %>" ProviderName="<%$ ConnectionStrings:OraContracts.ProviderName %>" SelectCommand="select rfqid,itemnum,qty,uom,unitprice from rfqvendordetails WHERE ((&quot;VENDORID&quot; = :VENDORID) AND (&quot;RFQID&quot; = :RFQID))">
                <SelectParameters>
                    <asp:SessionParameter Name="VENDORID" SessionField="vendorid" Type="String" />
                    <asp:SessionParameter Name="RFQID" SessionField="RFQID" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
            <br />
            <asp:GridView ID="GridView3" runat="server" DataSourceID="testupd" Width="425px" AutoGenerateColumns="False">
                <Columns>
                    <asp:CommandField ShowEditButton="True" />
                    <asp:BoundField DataField="RFQDETAILID" HeaderText="RFQDETAILID" SortExpression="RFQDETAILID" />
                    <asp:BoundField DataField="ITEMNUM" HeaderText="ITEMNUM" SortExpression="ITEMNUM" />
                    <asp:BoundField DataField="DESCRIPTION" HeaderText="DESCRIPTION" SortExpression="DESCRIPTION" />
                    <asp:BoundField DataField="QTY" HeaderText="QTY" SortExpression="QTY" />
                    <asp:BoundField DataField="UOM" HeaderText="UOM" SortExpression="UOM" />
                    <asp:BoundField DataField="UNITPRICE" HeaderText="UNITPRICE" SortExpression="UNITPRICE" />
                    <asp:BoundField DataField="TOTALPRICE" HeaderText="TOTALPRICE" SortExpression="TOTALPRICE" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="testupd" runat="server" ConnectionString="<%$ ConnectionStrings:OraContracts %>" ProviderName="<%$ ConnectionStrings:OraContracts.ProviderName %>" SelectCommand="SELECT &quot;RFQDETAILID&quot;, &quot;ITEMNUM&quot;, &quot;DESCRIPTION&quot;, &quot;QTY&quot;, &quot;UOM&quot;, &quot;UNITPRICE&quot;, &quot;TOTALPRICE&quot; FROM &quot;RFQVENDORDETAILS&quot; WHERE ((&quot;VENDORID&quot; = :VENDORID) AND (&quot;RFQID&quot; = :RFQID))" UpdateCommand="UPDATE CONTRACTS.RFQVENDORDETAILS SET DESCRIPTION = 'Test Desc2' WHERE ITEMNUM = :ITEMNUM">
                <SelectParameters>
                    <asp:SessionParameter Name="VENDORID" SessionField="vendorid" Type="String" />
                    <asp:SessionParameter Name="RFQID" SessionField="RFQID" Type="String" />
                </SelectParameters>
                <UpdateParameters>
                    <asp:Parameter Name="ITEMNUM" Type="String" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <br />
            <br />
        </div>
            <div>
                vendor comments</div>
        </form>
    </body>
    </html>
    ==============================================

  • APEX_PLSQL_JOB.SUBMIT_PROCESS with no results

    Hi,
    When I run APEX_PLSQL_JOB.SUBMIT_PROCESS I can see the process ran in the view APEX_PLSQL_JOBS from the sql workshop, but nothing has happened.
    For instance: when I submit the following, no results show up in the table.
    Any ideas as to how I can check what's going wrong?
    DECLARE
    t_job_id NUMBER;
    t_sql VARCHAR2(4000);
    BEGIN
    t_sql := 'BEGIN INSERT INTO EXAMPLE ( COL1, COL2, COL3, COL4) '||
    ' VALUES (1, 763707, 20, 30 ); END; ';
    t_job_id := APEX_PLSQL_JOB.SUBMIT_PROCESS (p_sql => t_sql);
    apex_debug_message.log_message('Job started: '||t_job_id);
    COMMIT;
    END;
    I am using APEX version 4.1.1.00.23 on Oracle 11g

    Hi,
    When I run APEX_PLSQL_JOB.SUBMIT_PROCESS I can see the process ran in the view APEX_PLSQL_JOBS from the sql workshop, but nothing has happened.For instance: when I submit the following, no results show up in the table.
    Any ideas as to how I can check what's going wrong?
    >
    This may be because the job has an error. Check DBA_ERRORS View for errors.
    Always post your code snippets in a pair of &#123;code&#125; tags as explained in the FAQ.
    >
    DECLARE
    t_job_id NUMBER;
    t_sql VARCHAR2(4000);
    BEGIN
    t_sql := 'BEGIN INSERT INTO EXAMPLE ( COL1, COL2, COL3, COL4) '||
    ' VALUES (1, 763707, 20, 30 ); END; ';
    t_job_id := APEX_PLSQL_JOB.SUBMIT_PROCESS (p_sql => t_sql);
    apex_debug_message.log_message('Job started: '||t_job_id);
    COMMIT;
    END;I am using APEX version 4.1.1.00.23 on Oracle 11g>
    In the above code, are all the columns of type Number? VARCHAR2 columns will need to be in quotes, right?
    Also check the Debug report of the page after running it in Debug mode. Maybe you will get some clues there too.
    Cheers,

  • Syntax for using AND with a variable in Business Rule Source

    I've never fully gotten my head around the AND/OR syntax of calc scripts. What I'd like to do is as follows in some basic pseudo code:
    FIX( ("A97" AND [Selected_Entity]) OR ("B76" AND [Selected_Entity]) OR ("C63" AND [Selected_Entity]) ).
    I want my webform's business rule to execute on the selected Entity in the form (eg. A97) ONLY if that entity is part of a restricted list of members (in this case, 3 entities out of 200).
    Thanks for any advice!

    Hi,
    I am not sure if I have totally understood what you are trying to achieve so sorry if I have misread it.
    But what you could do is set up a variable in the Bus Rule, lets call EntVar.
    It is set up as a local variable of type member and dimension Entity with a run time prompt "Enter Entity"
    Now in your script it could look something like this....
    FIX(&CurrentYr, "Working".......)
    "AccMember"(
    IF(@ISMBR(&#91;EntVar]) AND (&#91;EntVar]=="A97" OR &#91;EntVar]=="B76" OR &#91;EntVar]=="C63") )
    AccMember=.......;
    ENDIF
    ENDFIX
    Once you have tested the business rule, you can get your form to pass through the entity into the variable.
    Is this what you are trying to do?
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Problem with calling out parameter

    create table ee(id number,name varchar2(10))
    insert into ee values(1,'o')
    create table ee1 as select * from ee where 1=0
    CREATE OR REPLACE PROCEDURE p(OUT_count OUT NUMBER)
    AS
    CURSOR cur1 IS
    SELECT id, name from ee1;
    v_count NUMBER := 0;
    BEGIN -- MAIN
    FOR row1 IN cur1
    LOOP
    BEGIN
    INSERT INTO ee
    ( id,name)
    VALUES ( row1.id,row1.name);
    v_count := v_count + 1;
    EXCEPTION
    WHEN OTHERS THEN
    null;
    RAISE;
    END;
    END LOOP;
    OUT_count := v_count;
    COMMIT;
    EXCEPTION
    WHEN OTHERS THEN
    null;
         RAISE ;
    END;
    begin
    scott.p;
    end;
    i get error

    Hi,
    Whenever you have an error, post the full eroor message, including the line number.
    Indent your code, to show the scope of BEGIN, IF, LOOP, and other statements.
    When you post code on this site, type these 6 characters
    &#123;code&#125;
    (small letters only, inside curly brackets) before and after the actual code, to preserve spacing.
    If the procedure is defined as having one argument, an OUT argument, then you must call it with one argument, and it must be a variable (not a literal) of the correct type (NUMBER, in this case).
    What is the point of
    EXCEPTION
        WHEN OTHERS THEN
            null;
            RAISE;? Why catch the exceptions at all?
    Edited by: Frank Kulash on Mar 30, 2009 5:14 PM

  • Syntax for internal tables with same structure

    Hi,
    I would like to knwo what is the syntax to declare a table that has the same structure as the exisiting one?
    Say for example:
    Begin of it_tab,
       Data (1000) type c,
    End of it_tab.
    Now I would like to declare IT_Tab2 with the structure of it_tab, how should I do that? Thanks!

    HI Anyi,
    DATA <itab> TYPE|LIKE <tabkind> OF <linetype> WITH <key>
                [INITIAL SIZE <n>]
                [WITH HEADER LINE].
    Regards,
    Laxmi.

Maybe you are looking for

  • Has anyone even heard from Apple regarding the iWeb1.1 problems?

    I am curious to know if anyone has contacted tech support via phone or email and received some form of response to this rediculous problem eveyone is experiencing, and if so, what is their response? I was about to call tech support and/por write but

  • Maintain Linked Graphics in document files

    I would like to use SharePoint to maintain version control on documents that retain linked graphics.  Does SharePoint have a means to maintain the linking of image files in these type of publications?  Is there a workflow that we can use for this pur

  • New cache server

    Hi there, I am admin of an new ISP.Our service ADSL2+ over pppoe.Regarding to ISP legals,We have to track and monitor  the users that who surf the witch Website.For example IP x.x.x.x by MAC y.y.y.y watch the www.xxx.com at 3:00 am. Would you recomme

  • Reciever can`t recieve my sms even i reply

    reciever can`t recieve my sms even i reply

  • JList and List Model problems

    Hi I have a left list, a right list and a main listModel. I have buttons that move items from the left to the right and vice versa. this works fine but i have introduced the functionality to remove an element when it is selected in the left list.....