Url for pl/sql procedure

How does once put together the url for a pl/sql web procedure in rel 2? I tried http://<host>:<port>/pls/portal/schema.procedure
no go. I tried various combinations and can't seem to hit the right one. Any help?

Try get execute to public on this procedure or put this procedure in package and grant execute to public user on this package.

Similar Messages

  • Creating Web service for PL/SQL Procedure with Complex Data Types

    I need to created web service for PL/SQL Procedure with Complex Data types like table of records as parameters, how do we map the pl/sql table type parameters with web service, how to go about these?

    Hello,
    When you are creating a service from a Stored Procedure, the OracleAS WS tools will create necessary Java and PL wrapper code to handle the complex types (table of record) properly and make them compatible with XML format for SOAP messages.
    So what you should do is to use JDeveloper or WSA command line, to create a service from your store procedure and you will see that most of the work will be done for you.
    You can find more information in the:
    - Developing Web Services that Expose Database Resources
    chapter of the Web Service Developer's guide.
    Regards
    Tugdual Grall

  • Make EXE for Pl/sql procedure

    Hi all,
    I have one Pl/sql procedure for which i want make EXE.
    can we make EXE files for PL/sql procedures using ' Oracle Developer Tools for Visual Studio .NET'
    Thank you.

    Hi Al,
    Can you tell me in steps how to create EXE for pl/sql procedure using C# console application.
    I have one webservice link which i want to invoke and i have to put the webservice output in a saparate file.
    I wrote Pl/sql procedure which invokes/consumes the webservice using UTL_HTTP and also placed the output of Webservice in a saparate file using UTL_FILE.
    But i have to execute this procedure on a Workstation where there is No Oracle installed.
    as you suggested using C# console application. Will this Procedure with UTL_FILE & UTL_HTTP packages run in that c# console application.
    Thank you

  • URL Syntax for PL/SQL procedure

    I am trying to call a PL/SQL procedure to delete a file attachment (from How To). I have modified the procedure to accept three other arguments (app, page, session). My delete-column link is:
    #OWNER#.delete_my_file?p_file=#ID#,p_app=&APP_ID.,p_page=&APP_PAGE_ID.,&SESSION.
    My procedure source is:
    PROCEDURE DELETE_MY_FILE(p_file in number,p_app in number,p_page in number,
    p_session in number) as
    varLocation varchar(100);
    BEGIN
         DELETE FROM hr.file_subjects f
         WHERE f.id = p_file;
         --print the redirect back to the web browser, return to paqe
    varLocation := '<script>window.location="f?p='||p_app||':'||
    p_page||':'||p_session||'";</script>';
    htp.p(varLocation);
    END delete_my_file;
    I assume that I can call a PL/SQL function or SPROC with multiple arguments, do I simply have the URL wrong?
    I get the "...URL not found on server..." error.

    I already granted execute to public. I can run this SPROC from SQL*Plus with no issues. I was simply trying to expand upon the How TO example and pass multiple args to a SPROC that is called from a query region column link. If I put it at the page level process, then I have to use checkboxes (or something else) to indicate which files I want to delete and then call a page submit.
    Is it not possible to call a PL/SQL SPROC with multiple args from a web link in HTMLDB?

  • TTClasses interface for PL/SQL procedure and fetching its results

    Hi experts,
    I am using TimesTen Release 11.2.1.3.0;
    I created a simple PL/SQL procedure as follows in timesten-
    Command> create or replace procedure employee(eno in emp.empno%type) is
    > e_name emp.ename%type;
    > begin
    > select ename into e_name from emp where emp.empno = eno;
    > dbms_output.put_line(e_name);
    > end;
    > /
    And then I call it through TTClasses as
    TTCmd cmd, compilecmd;
    compilecmd.Prepare(conn,"alter procedure employee compile;",status);
    cmd.Prepare(conn,"begin employee(1020); end;",status);
    cmd.Execute(..);
    cmd.FetchNext(..);
    Here fetchNext is returning an error -
    [TimesTen][TimesTen 11.2.1.3.0 ODBC Driver]Invalid cursor state
    *** ODBC Error/Warning = 24000, TimesTen Error/Warning = 0
    *** Unable to fetch row for statement: <begin employee(1020); end;>.terminate called after throwing an instance of 'TTError'
    Aborted
    How can I run PL/SQL procedures/functions on TimesTen through TTClasses interface?
    Any help or input would be of great value.
    Thanks

    The issue here is nothing to do with TTClasses. Your PL/SQL procedure executes a SELECT statement (that returns just one row) using an implicit cursor within the PL/SQL procedure and retrieves the value of the ename column into the PL/SQL variable. However it does not them do anything with that value such as pass it back to the caller...
    Similarly, the TTClasses code executes a statement that it is expecting to create an ODBC level cursor 9which thsi PL/SQL invocation will not of course) and it is then trying to fetch from a cursor that does not exist.
    I would recommend that you take a look at the TimesTen PL/SQL documentation (Oracle® TimesTen In-Memory Database PL/SQL Developer's Guide Release 11.2.1) and refer to the section on IN, OUT and IN/OUT parameters. This will show you how you can use OUT parameters to return values to the caller. This technique works fine for ODBC, JDBC and OCi programs but does not sadly currently work with TTClasses. TTClasses has not yet been enhanced to support OUT and INOUT parameters. Of course as you have the source code for TTClasses you could make the necessary modifications yourself.
    I will open a bug requesting that TTClasses support OUT and INOUT parameters but in the meantime if you need this kind of capability you will need to either modify TTClasses yourself or switch to using a different API.
    Chris

  • Help need for PL/SQL procedure

    Hi guys,
    I have scenario like this
    Schema     T     LOGTABLENAME          TDIRECTORY
    DEV          DEV.ABC_LOG                    import-abc
    DEV          DEV.GBTSLOG          import-gbts
    DEV          DEV.CLSSBOG     import-cls
    QA          QA.TransactionlOG          import-transaction
    QA1 QA1.tlog import-ess
    QA2 QA2.translog import-trnals
    I have to write a procedure to get the log table data from schema Dev.I have to take Shcema dev and go to DEv.abc_log table and get the record from the dev.abc_logtable. The same way for other schema also with respective logtables .
    I would appreciate your help or suggestions.
    Reards,
    User
    Edited by: user1758353 on Dec 5, 2008 11:43 AM

    hello,
    im also not sure if i get the point but maybe you need sth. like that...
    create table schema_logtable as
    select 'dev' schema, 'dev.abc_log' tlogtable, 'import-abc' tdirectory from dual union all
    select 'dev', 'dev.gbtslog', 'import-gpts' from dual union all
    select 'dev', 'dev.clssbog', 'import-cls' from dual );
    declare
       v_slt_row schema_logtable%rowtype;
       type log_description_table is table of varchar2(1000char);
       v_log_description log_description_table := log_description_table();
    begin
       for v_slt_row in ( select * from schema_logtable )
       loop
          execute immediate 'select log_description from ' || v_slt_row.tlogtable bulk collect into v_log_description;
          for i in v_log_description.first .. v_log_description.last
          loop
             dbms_output.put_Line( 'log_desc: ' || v_log_description(i) );
          end loop;
       end loop;
    end;
    /this reads for every schema in table schema_logtable the name of the logtable.
    for each logtable you fetch all rows of that table into a variable and you can do what-ever you want with that...
    -mario

  • JDBC Url for connecting SQL Server Alias name

    Hi All,
    I am having a SqlServer Databse Instance for that we have created "alias name".
    i am unable to connect to that particular alias name.
    please can any one though light on this plz.
    Edited by: mahesh512 on Jun 17, 2009 6:48 PM

    If i am geussing right, you mean that you have created a TNS Name for your Database Server.
    If you are accessing it from your DB Client via the TNS name, maybe the CLient is configured to contact a TNS Server to retrieve the IP if the server.
    Your JDBC Driver does not do that. Either use the IP of the DB Server or provide a Source for the Driver to look up the IP via the TNS Name.
    How this is accomplished deplends on your Database.

  • Blob datatype as arguement to PL/SQL procedure

    Hi,
    Iam trying to pass Blob data from application program to PL/SQL as one of its arguement. The PL/SQL procedure will inturn insert the given Blob data into appropriate table in its corresponding Blob column.
    Ex:-
    PL/SQL Procedure:
    CREATE OR REPLACE PACKAGE TestPkg as
    PROCEDURE logData
    data IN Blob
    END TestPkg;
    Application Program:
    1. string sqlStmt="BEGIN TestPkg.logData(:1); END;";
    2. Connection * pConnection = getConnection();
    3. Statement * pStatement = pConnection->createStatement(sqlStmt);
    4. Blob blob(pConnection);
    5. blob.setEmpty();
    6. blob.write(100, pBuffer, 100, 1); <=== This results in (ORA-22275: invalid LOB locator specified)
    7. pStatement->setBlob(blob);
    8. pStatement->executeUpdate();
    9. pConnection->terminateStatement(pStatement);
    10. releaseConnection(pConnection);
    I used to get similar error while directly inserting from application program to a table with Blob column.
    We fixed it by using the "FOR UPDATE" clause in a select statement and obtaining the locator
    for LOB. Iam looking for a similar syntax for PL/SQL procedure inputs.

    Gaurav,
    Just a guess, but try the following:
    ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor( "SCOTT.HEADER_UPLOAD_TAB", oracleconnection );In other words, prefix the data-type name, HEADER_UPLOAD_TAB, with its schema owner name.
    Good Luck,
    Avi.

  • URL for SqlServer Thin Driver ?

    Hi all,
    I have developed a web application in jsp with Microsoft SQL Server 2000, used 4th type of driver and it is working fine in my desktop PC . When I tried to deploy war to Laptop, where SQL Server is installed as standalone, i got error in establishing the connection with the socket, Following is the code snippet i used for laptop
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");                              
    String    strDBUrl="jdbc:microsoft:sqlserver://localhost:1433;databaseName=GNXT;selectMethod=cursor";for workstation or desktop, i just changed the localhost into the database server name
    I suspect problem is with the URL, Can anyone give me the URL for Ms Sql Server 4th type jdbc driver?
    Suggestions welcome!!!
    Regards,
    Srini.

    The URL is the same.
    Did you double checked that the server is listening to TCP?
    Try to use your local IP instead of 'localhost'.

  • Creating webservice for pl/sql API without using BPEL

    Hi All,
    Using BPEL, We have created partner links using DB Adapter for accessing our pl/sql API's.
    Is there any way to create a web service for a pl/sql API having complex datatype parameters like (Record, table of records etc) using DB Adapter or any other tool without using BPEL?
    Thanks,
    Uma.

    We introduced the use of JPublisher to automate the generation of wrappers for PL/SQL procedures that use types such as boolean, record and table. The wizard will invoke JPub and generate artifacts that the partnerlink will use to invoke the wrapper instead of the original API. Boolean is replaced by INT, record is replaced by an object type and table is replaced by a nested table. The wrapper will invoke the original API. JPub also takes care of converting between the different types (i.e. record <-> object).

  • How to get data from URL in a PL/SQL procedure

    Hi!<br>
    <br>
    I want to pass values in APEX from a report with a link to a PL/SQL procedure through URL.
    How can I make this?<br>
    <br>
    For example:<br>
    <br>
    I have a report:<br>
    <br>
    select<br>
       id,<br>
       name,<br>
       akt,<br>
       case<br>
          when akt is NULL then '< a href="f?p=&APP_ID.:27:&SESSION.:START_PROCESS" name="test_link" >set< /a >'<br>
       end choice<br>
    from<br>
       USERS;<br>
    <br>
    I want to pass the value "id" in the link ( named "test_link" ) . And want to use this value in a process like this:<br>
    <br>
    DECLARE<br>
       v_user_id NUMBER(10);<br>
    BEGIN<br>
       --I want to read this value from the url<br>
       if :REQUEST='START_PROCESS' then<br>
          v_user_id := ????;<br>
          <br>
          ...<br>
       end if;<br>
    END;<br>
    <br>
    <br>
    Thanks!<br>
    Marton

    Hi,
    1- Create a hidden item P27_USER_ID on page 27
    2- Change your code :
    SELECT ID, NAME, akt,
           CASE
              WHEN akt IS NULL
                 THEN    '< a href="f?p=&APP_ID.:27:&SESSION.:START_PROCESS:NO::P27_USER_ID:'
                      || ID
                      || '" name="test_link" >set< /a >'
           -- refer to f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
           END choice
      FROM users;
       And then
    DECLARE
       v_user_id   NUMBER (10);
    BEGIN
       --I want to read this value from the url
       IF :request = 'START_PROCESS'
       THEN
          v_user_id := :p27_user_id;
           --your code
       END IF;
    END;Hope this helps,
    Grégory

  • Creation of DB Adaptert for calling stored procedure in MS SQL server

    Hi,
    I need to create a DB adapter to call a stored procedure in MS SQL Server.
    I have gone thru the thread MS SQL Server database connection
    It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
    Any links to tutorials are welcome.
    Thanks !!.
    Silas.

    Command line is required for stored procedures, if you are using the basic options you don't need to worry.
    (1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
    (2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
    (3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
    (4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
    AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
    While executing this step make sure that your JDeveloper is closed.
    (5) On command prompt go to J Developer folder and execute following command
    jdev -verbose
    This will open JDeveloper.
    (6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
    (7) Select Third Party JDBC
    (8) Specify MS Sql Server User Name, password and Role.
    (9) In connection page specify following
    - Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
    - For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
    - Specify URL as following.
    jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
    (10) Go to Test page and test it.
    cheers
    James

  • 403 Forbidden error calling PL/SQL Procedure from URL

    I am getting a 403 Forbidden browser error when calling a PL/SQL procedure from the URL, as in this:
    http://<server.port>/apex/SCHEMA.procedure_name/f?p_param1=394&p_param2=2, etc
    We are upgrading from HTMLDB 2.0 to APEX 4.0.2. I do not believe the upgrade has anything to do with it, c/o the upgraded app works fine in another APE 4.0.2 environment.
    The upgrade is to new machines, new DB and new app server, Oracle Web Tier, Oracle HTTP server deployment.
    The dads.conf entries are fine, all standard:
    Alias /i/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/images/"
    Alias /c/ "/apexd01/app/oracle/product/http/Oracle_WT1/ohs/custom_htmldb/"
    <Location /pls/apexd>
    Order deny,allow
    PlsqlDocumentPath docs
    AllowOverride None
    PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
    PlsqlDatabaseConnectString dbserver.us.com:1521:SERVER.US.COM ServiceNameFormat
    PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
    PlsqlAuthenticationMode Basic
    SetHandler pls_handler
    PlsqlDocumentTablename wwv_flow_file_objects$
    PlsqlDatabaseUsername APEX_PUBLIC_USER
    PlsqlDefaultPage apex
    PlsqlDatabasePassword apexpwd
    PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
    Allow from all
    </Location>
    The GRANT EXECUTE ON procedure TO PUBLIC is there.
    A call to the same procedure via a process in an APEX page works fine - the procedure is OK.
    The call from javascript, which sets up the call from the URL, is the one that fails with the 403 Forbidden error.
    The same app works fine in another APEX 4.0.2 environment, so I know it is not the JS; It has to be some configuration setting in this environment.
    I do NOT have access to the app server.
    I have asked that they compare the httpd.conf, and all underlying conf files, to check for differences.
    In order for me to be more specific, and hopefully speed up the troubleshooting process, can anyone suggest what other settings to look at?
    Thank you - Karen

    Hello,
    Good catch, but the difference in URL is in fact the difference in my env to theirs. My typo in not correcting my example to match the dads.conf entry of /pls/apexd. My env uses /apex/. Just saves on my typing.
    As an update, I asked the DBA to double-check, and yes, the www_flow_epg_include_mod_local function IS there.
    www_flow_epg_include_mod_local is an APEX function.
    So now we are trying adding procedures to it. I'll let you know if it works.
    My previous question remains - why would I need to do this in one env, and not another,
    given that the DB GRANTs are there.
    Is there a particular app server setting that wil block execution of PL/SL procedures from the URL?
    My guess is, there is some difference in configuration settings for the app server, somewhere in the httpd.conf chain.
    Since I do not have access to those files, I cannot do a diff myself, as I would have if I the issue was on my machine.
    I am in a situation where I can suggest what to do, but that's it. I agree, it's hard to troubleshoot in this situation.
    I am being asked "what setting do I need to change?" without the benefit of access to what is there,so I am doing the best I can, without diverting from my work for a deep-dive refresher session on httpd.conf settings.
    So, if anyone is aware of some setting that would block execution of a PL/SQL proc from the URL, please let me know,
    and of course, if adding a proc to www_flow_epg_include_mod_local works, I'll be happy. Just still curious.
    Thank you - K

  • What is the url for executing PL/SQL via 9i http

    what is the URL for 9i http server pl/sql routines that I just compiled? I don't run 9ias just the 9i http server
    http://machine:port/?????????/procedure_name
    thnx
    endre

    do this if you are still having problemd
    CREATE AND SETUP NEW USER
    The second step is to create an application user that will
    own the code for this example. Connect to SQL*PLUS as a user with
    DBA rights, and execute the following commands:connect
    SQL> CREATE USER user IDENTIFIED by user;
    SQL> GRANT CONNECT, RESOURCE TO user;
    CONFIGURE DAD IN THE PL/SQL GATEWAY
    The third step is to create a new DAD.
    Enter the PL/SQL gateway configuration menu. The generic address to the
    page is
    http://<machin:port/pls/admin_/gateway.htm
    The is specified in your plsql.conf file. By default the address
    will be
    http://..:/pls/admin_/gateway.htm
    (Replace ..: with the valid entry for your
    configuration, e.g. www.acme.com:8080).
    Click on the link 'Gateway Database Access Descriptor Settings' to access
    your DAD settings. Then press the link 'Add for WebDB 2.x configuration'
    to create a new DAD. Enter the following values:
    Parameter Value
    Database Access Descriptor Name give name
    Schema Name the user you created
    Oracle User Name the user you created
    Oracle Password the password of the user
    Oracle Connect String <- found in your
    tnsnames.ora
    Document Table                    documents
    Document Access Procedure user.package.procedure
    Extensions to be uploaded as LONG RAW
    Leave the other parameters as they are. If you are not using an 8i database
    or need to use the LONG RAW datatype for
    some reason, you can place an '*' in the "Extensions to be uploaded as LONG
    RAW" field. You can also limit this to
    specific file name extensions such as jpg or pdf by entering the extensions
    and using a comma to separate the
    values. Click the OK button to save the DAD configuration.
    Hope this helps

  • My pl/sql procedure works; I'm just looking for someone to review it

    Hi All,
    I wrote the below procedure to be executed via APEX (inside the APEX_PLSQL_JOB.SUBMIT_PROCESS wrapper).
    It works fine, but I'm not a programmer per se and am just curious if one of the veterans on this forum could review it
    and just tell me if it looks like I followed proper standards/procedures etc. or make any suggestions on how I can be more efficient etc.
    The purpose of the procedure is to update Oracle Applications translations tables with language-translated values that we have
    accumulated from our global workforce. It's pretty simple - just a big find and replace exercise - replacing english values in the apps
    tables with translated values. Oracle's '_TL' tables are designed for this purpose and I'm not updating any primary or foriegn keys.
    I don't know the exact update statement or instance at the time of execution and hence the need for dynamic SQL and a DB link.
    Again, there are no issues (yet) - everything is working fine, I'm just interested in having someone review it and offer me some feedback.
    thanks in advance,
    John
    create or replace
    procedure GSE_UPDATE_TL_TABLES (l_instance IN varchar2, l_app_job IN number)
    IS
    l_tname  varchar2(30);
    l_column_name VARCHAR2(30);
    l_col_value VARCHAR2(4000);
    l_eng_value VARCHAR2(4000);
    l_language VARCHAR2(4);
    i number;
    l_query VARCHAR2(4000);
    l_messages dbms_output.chararr;
    l_numlines integer := 1000; -- retrieves max 1000 messages from the buffer
    l_rows_updated number := 0;
    l_rows_processed number;
    CURSOR TABLES_CUR IS
    SELECT TABLE_NAME, COLUMN_NAME, COLUMN_VALUE, eng_value, LANGUAGE FROM GSE_LNG_STRINGS WHERE COMPLETION_STATUS = 'Y'; ---This table is our repository of translations
    and includes the english value, the translated values, the language code and the table and column names that will be updated.
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    delete from gse_update_tracking;  ---I'm using this table to track real-time progress and to update a progress status bar in APEX.
    commit;
    open tables_cur;
    LOOP
    fetch tables_cur into l_tname, l_column_name,l_col_value, l_eng_value, l_language;
    EXIT WHEN tables_cur%NOTFOUND;
    BEGIN
    EXECUTE IMMEDIATE
    'Update ' ||l_tname||'@'||l_instance||' set ' ||l_column_name|| ' = q''['||l_col_value||']''  where ' ||l_column_name|| ' = q''['||l_eng_value||']'' and language = '''||l_language||'''';
    l_rows_updated := (l_rows_updated + sql%rowcount);
    insert into gse_update_tracking (counter) values (1);
    commit;
    exception
      when dup_val_on_index then
    l_query := 'Update ' ||l_tname||'@'||l_instance||' set ' ||l_column_name|| ' = q''['||l_col_value||']''  where ' ||l_column_name|| ' = q''['||l_eng_value||']'' and language = '''||l_language||'''';
    DBMS_OUTPUT.PUT_LINE('This query caused DUP_VAL_ON_INDEX exception: '||l_query);
    when others then
    l_query := 'Update ' ||l_tname||'@'||l_instance||' set ' ||l_column_name|| ' = q''['||l_col_value||']''  where ' ||l_column_name|| ' = q''['||l_eng_value||']'' and language = '''||l_language||'''';
    DBMS_OUTPUT.PUT_LINE('This caused an undefined exception: '||l_query);
    end;
    End Loop;
    l_rows_processed := tables_cur%rowcount;
    update gse_lng_jobs set rows_processed = l_rows_processed, rows_updated = l_rows_updated where job_id = l_app_job;
    close tables_cur;
    begin
    dbms_output.get_lines(l_messages, l_numlines);
    for i in 1..l_messages.count
    loop
    insert into gse_lng_update_exceptions(id, text, Job) values(i, l_messages(i), l_app_job);
    commit;
    end loop;
    end;
    END;

    Hoek, davidp 2, Tubby, rp0428 et al.,
    I think I'm making progress. I'm researching and trying to incorporate your suggestions.
    I worked through the examples of error logging here: http://www.oracle.com/technetwork/issue-archive/2006/06-mar/o26performance-096310.html. I'm not sure if this will work for me though since I'm updating many tables and not just one. So it seems I would need to run this for every table that I'm updating?
    BEGIN
            DBMS_ERRLOG.CREATE_ERROR_LOG('[table_name]');
    END;
    Otherwise, this is the current state of things:
    create or replace
    procedure gse_lng_test_1 (p_table varchar2, p_column varchar2) *--using proper parameter names prefixed with 'p' to distinguish from local variables*
    IS
    i number;
    l_query VARCHAR2(4000);
    l_messages dbms_output.chararr;
    l_numlines integer := 1000; -- retrieves max 1000 messages from the buffer
    l_rows_updated number := 0;
    l_rows_processed number;
    BEGIN
    DBMS_OUTPUT.ENABLE(1000000);
    commit;
    l_query := 'Update ' ||p_table||' set ' ||p_column|| ' = :newval where '||p_column|| ' = :engval and language = :lang' ; *--build the string once in a local variable with bind variables. Table names and column names are passed via parameters*
    for c2 IN (SELECT TABLE_NAME, COLUMN_NAME, COLUMN_VALUE, eng_value, LANGUAGE FROM GSE_LNG_STRINGS WHERE COMPLETION_STATUS = 'Y' and table_name = p_table and column_name = p_column) *--using implicit cursor instead of explicit cursor*
    LOOP
    BEGIN
    EXECUTE IMMEDIATE l_query USING c2.eng_value, c2.column_value, c2.language; *--execute immediate with bind variables*
    exception
      when dup_val_on_index then
      dbms_output.put_line('this query caused a dup_val_on_index: '||SQLERRM||' - '||l_query); *--include SQLERRM in message*
    when others then
    dbms_output.put_line('this query caused an exception: '||SQLERRM||' - '||l_query); *--include SQLERRM in message*
    end;
    commit;
    end loop;
    end;Now that the table names and column names are in parameters, I am calling this from APEX as follows:
    Begin
    for c1 in (select distinct table_name, column_name from gse_lng_strings)
    LOOP
    gse_lng_test_1 (p_table=> c1.table_name, p_column=>c1.column_name);
    end loop;
    end;The one thing I need to do is to get a status of the number of rows processed and updated so I can report back to APEX realtime with a jquery counter plugin that I'm using. That was the reason I was inserting records into a dummy table (gse_update_tracking) before. It worked ok but I realize it was a clumsy approach. I'm not to sure how to accomplish that since I don't think I can access sql%rowcount while the loop is running. Is that correct and if so, are there any other options?
    I know I still need to deal with my exception handling and I would like to use the DML error logging if at all possible.
    Overall though I feel like it's much cleaner and more manageable. Hopefully it's looking better?
    thanks again for the education - I really appreciate it,
    John

Maybe you are looking for