Oracle datalinks to update a MS SQL table

I am accessing a MS SQL table thru an Oracle procedure. Reads with no problems. When I try and update a column (2 columns affected one is a int and the other is datetime) receive the following error:
ORA-02070: database IWSCIV does not support || in this context
Sql Statements tried are
UPDATE iwPhotoProcessed@IWSCIV
SET "Status" = 1
where "BKno" = '1' || v_app_id;
UPDATE iwPhotoProcessed@IWSCIV
SET "Status" = 1, CompletedDate='04/05/2008 09:14:15 AM'
where "BKno" = '1' || v_app_id;
The above command (minus the @IWSCIV) works fine in MS SQL and updates rows.

1) I would generally suggest avoiding string literals when doing UPDATE statements in general, but particularly in the case of updates across Heterogeneous Connectivity database links.
2) I would generally write something like this (assuming "BKno" is declared as a string)
DECLARE
  l_new_status NUMBER := 1;
  l_app_id VARCHAR2(10) := '1' || v_app_id;
BEGIN
  UPDATE iwPhototProcessed@IWSCIV
     SET "Status" = l_new_status
   WHERE "Bkno" = l_app_id;
END;Justin

Similar Messages

  • How to Update this T-SQL Table?

    Hello,
    I am having trouble finding the correct syntax for updating this T-SQL table.
    Here is my Query which is adding an additional ' at the beginning and end.
    Query:
        Update [denodo].[dbo].[wrappers]
      SET wrapperWhereClause = '''AND County_Input=''Cheyenne & Arapaho Tribal Court'' AND WrapperID=729'''
      WHERE wrapperID = '729'
    The Outcome:
    'AND County_Input='Cheyenne & Arapaho Tribal Court' AND WrapperID=729'
    The Outcome I am hoping for:
    AND County_Input='Cheyenne & Arapaho Tribal Court' AND WrapperID=729
    Can anyone help me edit this so I can receive the outcome I am hoping for?

    >> Please learn
    I am having trouble finding the correct syntax for updating this T-SQL table. Here is my Query [sic] which is adding an additional ' at the beginning and end. <<
    Please learn basic terms so
    we can communicate. UPDATE is a statement and not a query. You do not know ISO-11179 rules, etc.
    Why are you building statements in SQL? You are doing bad SQL programming
    and need to stop. Your silly meta-data “wrapper_where_clause” and “county_input” is so fundamentally wrong I would fire you. Look at what I have done
    with SQL and see what a criticism that is!
    UPDATE Wrappers
    SET ??
    WHERE county_something =
    'Cheyenne & Arapaho Tribal Court'
    AND wrapper_id = '729';
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • SQL Bulk Update using Update query in SQL Table

    Hello All,
    I want to update data in sql table depends on some condition.
    I am getting excel sheet from client and want to change value of field say Status = c.
    Client is sending excel sheet with 300 field and want to change value for all 300 records with unique fields (field1 and field2) comming in that excel sheet...
    How can i write and update records as Bulk.
    Instaed updating one one recors ?
    Example ( Update Table_Name Set Status = 'c' Where Field1 = Value from Excel for Field1 and
    Field2 = Value from Excel for Field2 )
    Same needs to do for 300 records...
    Any help will wellcome.
    Thanks,
    Nilesh....
    Thanks and Regards, Nilesh Thakur.

    you can use OPENROWSET for that
    http://www.mssqltips.com/sqlservertip/1540/insert-update-or-delete-data-in-sql-server-from-excel/
    Another way is to use SSIS with data flow task having Excel source connecting to excel and using OLEDB command to update rows in table using it. You may also use staging table to get data from excel and later use it inexecute sql task to update your table
    to make update set based which would be faster.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Updating an MS SQL table producing errors

    I'm encountering a strange problem.
    I'm writing a Java application that updates the data in every row for a particular column in a table of a MS SQL Server database. There are about 9000 rows in these tables.
    Each time I run the application, it would update the first hundred rows, and then the program would catch an error "String index out of range".
    The strange thing is that I have about 9 tables, and each of them have that many or more rows, and every one of them update without any problem, so I know that there isn't any problem with the code that's generating the new data to be updated.
    To troubleshoot this problem, I've reduced the application to be as simple as possible, but I still have the same problem. I've looked at the database, and the row where it stops doesn't seem to be any different from the rest.
    Here's my simplified code:
    String tableStr = "Table1";         ResultSet table;         int newData = 1000000;         int DataCol = 29;         try{             Statement stmt;             String sql = "select * from dbo."+tableStr;             String tempData;             stmt = Conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);             table = stmt.executeQuery(sql);             System.out.println("Table dbo."+tableStr+" populated");             while(table.next()){                 tempData = DataGen(newData,false,true);                 table.updateString(DataCol, tempData);                 table.updateRow();                 System.out.println(table.getRow()+" "+tempData);                 newData++;             }         }         catch (Exception e){             System.err.println(e.getMessage());         }
    The error caught (Exception e) is "String index out of range: -10872"
    What is the possible reason that is causing this?

    To be honest, I never knew that function existed... Thanks for the tip. The error still doesn't help though. I changed the function to do nothing but write a string to the function, but now I got this instead. Appears to be either a problem with the server or the driver.
    java.sql.SQLException: TDS Protocol error: Invalid packet type 0x0
            at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2314)
            at net.sourceforge.jtds.jdbc.TdsCore.getNextRow(TdsCore.java:764)
            at net.sourceforge.jtds.jdbc.MSCursorResultSet.processOutput(MSCursorResultSet.java:959)
            at net.sourceforge.jtds.jdbc.MSCursorResultSet.cursorFetch(MSCursorResultSet.java:719)
            at net.sourceforge.jtds.jdbc.MSCursorResultSet.next(MSCursorResultSet.java:1137)I've tried a work around but I still don't know what may be causing it. Because I know if always stops at the 100th row, I got it to do 50 rows at a time and close and re-populate the resultset each time and now it works.
    Thanks!

  • Using PL/SQL Table in Forms

    Hi,
    I am populating a PL/SQL table by fetching data through a explicit cursor. But when i am accessing the PL/SQL table after population, i am getting a "NO DATA FOUND" error.
    I am attaching the Forms local progam units which have the logic.
    PACKAGE f_get_bike_makers IS
    TYPE prectype_maker_dtls_pll IS RECORD (
    country_code ad_bike_maker_details.abmd_country_code%TYPE,
    country_name table_values.tvs_description%TYPE,
    manu_code ad_bike_maker_details.abmd_manufacturer_code%TYPE,
    maker_name ad_bike_maker_details.abmd_maker_name%TYPE,
    maker_name_kana ad_bike_maker_details.abmd_maker_name_kana%TYPE,
    const_by ad_bike_maker_details.abmd_constructed_by%TYPE,
    const_time ad_bike_maker_details.abmd_construction_time%TYPE,
    update_by ad_bike_maker_details.abmd_updated_by%TYPE,
    update_time ad_bike_maker_details.abmd_updated_time%TYPE
    TYPE ptabtype_maker_dtls_pll IS TABLE OF prectype_maker_dtls_pll
    INDEX BY BINARY_INTEGER;
    FUNCTION f_get_bike_makers_pll RETURN ptabtype_maker_dtls_pll;
    END;
    PACKAGE BODY f_get_bike_makers IS
    FUNCTION f_get_bike_makers_pll
    RETURN ptabtype_maker_dtls_pll
    IS
    CURSOR cur_maker_dtls
    IS
    SELECT abmd.abmd_country_code,
    tvs.tvs_description,
    abmd.abmd_manufacturer_code,
    abmd.abmd_maker_name,
    abmd.abmd_maker_name_kana,
    abmd.abmd_constructed_by,
    abmd.abmd_construction_time,
    abmd.abmd_updated_by,
    abmd.abmd_updated_time
    FROM ad_bike_maker_details abmd,
    table_values tvs
    WHERE abmd.abmd_country_code = tvs.tvs_code
    AND tvs.tvs_tad_code = 'COUNTRIES'
    ORDER BY abmd.abmd_country_code;
    ln_tab_index BINARY_INTEGER := 0;
    ltab_maker_dtls ptabtype_maker_dtls_pll;
    BEGIN
    FOR lcur_maker_dtls IN cur_maker_dtls
    LOOP
    ln_tab_index := ln_tab_index + 1;
    ltab_maker_dtls (ln_tab_index) := lcur_maker_dtls;
    END LOOP;
    RETURN ltab_maker_dtls;
    END f_get_bike_makers_pll;
    END;
    PROCEDURE f_populate_maker_names
    IS
    ltab_maker_dtls f_get_bike_makers.ptabtype_maker_dtls_pll;
    lb_record_group BOOLEAN;
    ln_ltab_maker_dtls_index BINARY_INTEGER;
    BEGIN
    -- read all the vehicle types from table_values
    -- get makers and countries
    ltab_maker_dtls := f_get_bike_makers.f_get_bike_makers_pll ;
    DELETE_GROUP_ROW ('REC_MAKER_NAME', all_rows);
    ln_ltab_maker_dtls_index := ltab_maker_dtls.FIRST;
    begin
    WHILE ln_ltab_maker_dtls_index IS NOT NULL
    LOOP
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_MANUFACTURER_CODE',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).manu_code,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_MAKER_NAME',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).maker_name,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'COUNTRY_NAME',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).country_name,
    ln_ltab_maker_dtls_index
    lb_record_group := l_record_group.insert_value ('REC_MAKER_NAME',
    'ABMD_COUNTRY_CODE',
    ltab_maker_dtls (ln_ltab_maker_dtls_index).country_code,
    ln_ltab_maker_dtls_index
    ln_ltab_maker_dtls_index := ltab_maker_dtls.NEXT (ln_ltab_maker_dtls_index);
    end;
    END LOOP;
    exception when no_data_found then
    message('ln_ltab_maker_dtls_index :'||ln_ltab_maker_dtls_index);
    message(' ');
    end;
    ltab_maker_dtls.DELETE;
    END;
    SQL> desc ad_bike_maker_details
    Name Null? Type
    ABMD_COUNTRY_CODE NOT NULL VARCHAR2(2)
    ABMD_MANUFACTURER_CODE NOT NULL VARCHAR2(2)
    ABMD_MAKER_NAME VARCHAR2(60)
    ABMD_MAKER_NAME_KANA VARCHAR2(60)
    ABMD_CONSTRUCTED_BY NOT NULL VARCHAR2(20)
    ABMD_CONSTRUCTION_TIME NOT NULL DATE
    ABMD_UPDATED_BY VARCHAR2(20)
    ABMD_UPDATED_TIME DATE
    SQL> desc table_values
    Name Null? Type
    TVS_TAD_CODE NOT NULL VARCHAR2(15)
    TVS_CODE NOT NULL VARCHAR2(15)
    TVS_DESCRIPTION NOT NULL VARCHAR2(70)
    Oracle Database Version
    =======================
    Oracle8 Enterprise Edition Release 8.0.6.1.0 - Production
    PL/SQL Release 8.0.6.1.0 - Production
    Forms Version
    ==============
    Forms [32 Bit] Version 5.0.6.8.0 (Production)
    PL/SQL Version 2.3.4.0.0 (Production)
    Please do let know what could be the possible source of error.
    Thanks in advance.
    Nitin

    But we have to use the PL/SQL table as per our design standards.
    We are implementing the population logic of the PL/SQL table in the database as a
    package function. We are then accessing the PL/SQL table in Forms to populate the record group.It is curious that you would have such a unique requirement -- something that might make forms run a tiny bit faster -- yet you are using an ancient version of Forms.
    Also the "NO DATA FOUND" error is not raised everytime the PL/SQL table is accessed.
    What could be the reason for this erratic behaviour?I wonder if there may be a bug in SQL Net in the Oracle-to-Forms communication where PL/SQL tables are passed as out parameters. I know there is one in Web Forms 6 (6.0.8.19.1) when passing a pl/sql table from the form to Oracle -- I had to write the pl/sql table to a database table to get my process to work.

  • ODSI support for return type "PL/SQL TABLE"?

    Hello!
    We are trying to connect our ODSI to an Oracle function with return type "PL/SQL TABLE". The ODSI "wizard" (used to create the physical data service) seems to understand the interface during creation, but when executed it fails. The ODSI server complains about wrong type (PLS-00382: expression is of wrong type) when we execute it from the "test tab".
    The function's metadata is looks like this:
    <params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:physical/rekondis/CALC_DEBITING" >
    <param name="RETURN_VALUE" kind="return" xqueryType="pn1:RETURN_VALUE_ROW" nativeTypeCode="1111" nativeType="PL/SQL TABLE"/>
    <param name="PIN_CASE_ID" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PIN_ACTION_CODE" kind="in" xqueryType="xs:decimal" nativeTypeCode="3" nativeType="NUMBER"/>
    <param name="PI_AD_NAME" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    </params>
    Any ideas how we can make this work!? Or is this not even supported in ODSI 10.3?
    Thanks!
    // Mikael

    Please refer to the documentation - http://download.oracle.com/docs/cd/E13162_01/odsi/docs10gr3/datasrvc/Create%20Physical%20Data%20Services%20from%20Stored%20Procedures.html

  • Problem with SQL table

    Hello,
    My house mates and me are database development students, we started studying Oracle Database Express Edition. We both used same pen drive to install oracle and to transfer the tutorial sql table to C:\oraclexe\app\oracle\product\11.2.0\server\bin . When I use the command "select * from table;" im getting "no rows selected" .
    With the same file and same command, the table is displayed on my housemate`s computer. Why it doesnt work on me ? The only difference is that im on XP, he is on win7.

    SQL> select * from cat;
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    APEX$_ACL TABLE
    APEX$_WS_FILES TABLE
    APEX$_WS_HISTORY TABLE
    APEX$_WS_LINKS TABLE
    APEX$_WS_NOTES TABLE
    APEX$_WS_ROWS TABLE
    APEX$_WS_TAGS TABLE
    APEX$_WS_WEBPG_SECTIONS TABLE
    APEX$_WS_WEBPG_SECTION_HISTORY TABLE
    BIN$+14+HMhfQhmc/wBwDDgDMg==$0 TABLE
    BIN$+dLRoxSfRsS79lxdAW3H1g==$0 TABLE
    BIN$+uVuekYHTye3LWDqeeRmcw==$0 TABLE
    BIN$/4anwnG1RSCVM9ugl4ytOg==$0 TABLE
    BIN$0QrShGnYQ3+DRYEnnJFwwg==$0 TABLE
    BIN$0Z2X1K0XSxi97HriFGSd0Q==$0 TABLE
    BIN$0k4r8phUQ7Cc+M65swlLig==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$1UqGPQ3eRYuNkb3/XacgNQ==$0 TABLE
    BIN$1cwHQMkdSLG5cJ19OZy+ow==$0 TABLE
    BIN$243UziA/T5iejwir7s82xQ==$0 TABLE
    BIN$2I+OmIlfT6OW/3V1kj5LDQ==$0 TABLE
    BIN$2reTHL6MSS6UtzuNe5p0XQ==$0 TABLE
    BIN$3RYELYE0SRmJSbb22V+09Q==$0 TABLE
    BIN$40KATBFYR2KGOSX+NW3mzA==$0 TABLE
    BIN$4CvKoaIcRVOH3CjPI7x+2w==$0 TABLE
    BIN$4tB3PqH3QhuAzwX6JTQmfQ==$0 TABLE
    BIN$54XttiE/TLejC9R6zSvOhQ==$0 TABLE
    BIN$5bwIu8QJRk6RiqplhYOipg==$0 TABLE
    BIN$6QbqIX71Tqy2aU9lNfweJg==$0 TABLE
    BIN$6jUe6GNsT7Cfy606JJUOpg==$0 TABLE
    BIN$73QnPKxlQOSv5M5hewjUGg==$0 TABLE
    BIN$7Sxf2g9XRoOoOrN5xnl7Rw==$0 TABLE
    BIN$7ybCkN+mTPqEmkfeXvx9WQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$8Yes6m0ZT7arykKeIX5ylg==$0 TABLE
    BIN$8ktaa2UvRO6pJuvF5o5c3Q==$0 TABLE
    BIN$9IrxwjOAS4OqSH/+bvKpmg==$0 TABLE
    BIN$9KhJzVDAS4CBJt7JWogfmA==$0 TABLE
    BIN$9eaxchybT5aAtw3dSTHskA==$0 TABLE
    BIN$9fEMvhpLSdaw0eQBetffaw==$0 TABLE
    BIN$9jJYCasWSfmZ/I/Ou59zYA==$0 TABLE
    BIN$9rpQRYN+Tzi4MhnA/+9DVw==$0 TABLE
    BIN$AjXsa+bDR5uWpo1u2iPPCw==$0 TABLE
    BIN$AmZt7sqgSFKVlGZ1tobIkA==$0 TABLE
    BIN$B1Oafcq8SzameUXhNOoZFA==$0 TABLE
    BIN$B1PCjRt4SVuhjwg/FaCvNQ==$0 TABLE
    BIN$Bs1hr9f3S3ud0MhZO7JVCA==$0 TABLE
    BIN$CA7ACjcQQoesNqWg0k94rg==$0 TABLE
    BIN$CF2TpIgXT76mwpeYEORO3Q==$0 TABLE
    BIN$COnpWebyQyKOvQvt7OclJw==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$CVjTUKi7SMSua/LGz9fpzA==$0 TABLE
    BIN$CupfqQo7RTqqqF+xYcmUvA==$0 TABLE
    BIN$CxMLMmA4T0aIbqSKdxsZ0A==$0 TABLE
    BIN$E+TR+RejSY+t9O0NKqnEgA==$0 TABLE
    BIN$EbzQcDihSt2Cv2yGVYH76A==$0 TABLE
    BIN$F4mQgC3OQzyTHOfxe3EbMA==$0 TABLE
    BIN$FQxQIZ2nRDKWv5lhi2MgVQ==$0 TABLE
    BIN$GW80+MfyTjS2C7H/YnHKjA==$0 TABLE
    BIN$GuA4XOy+TjCgL8MwfaJ0Ag==$0 TABLE
    BIN$HPt4d6RlQHGODTK+3i9Ymg==$0 TABLE
    BIN$HtXPeXEqRxCcY1aUiSo+dQ==$0 TABLE
    BIN$Hx20oVXCReCZHWN+7aH0uw==$0 TABLE
    BIN$J9/wbv9bSbyU/2HrOBidIA==$0 TABLE
    BIN$JEsopaTPSQ2hdbLaw9KiYQ==$0 TABLE
    BIN$JGnvCmGIQ+e2Qki5AFaYDQ==$0 TABLE
    BIN$JcwyBadcTiS9pmpMi2GKwg==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$Jkf7/MHYT1qDeanLo/Sw2Q==$0 TABLE
    BIN$KAGywEHPRuepwC/S0Gv1jg==$0 TABLE
    BIN$LAJRRsjvSSWCuOxz/5NWbg==$0 TABLE
    BIN$M4/PznY8RW6/iAWbzrOYpQ==$0 TABLE
    BIN$MNavZEECR6GI7Alpo6GwxA==$0 TABLE
    BIN$MNs10fZTTii1JSzhHDL3rg==$0 TABLE
    BIN$MRQvyzXSRXK+cf0Chiv9+w==$0 TABLE
    BIN$Muw/JhnURvi8ZiS6RSpP4A==$0 TABLE
    BIN$NkeH50+nRAuypA2oBentLw==$0 TABLE
    BIN$OHpuIfw6TkKi5tEKmSbg5Q==$0 TABLE
    BIN$P1HlgkdlTJeysz9RxnEKdg==$0 TABLE
    BIN$PNgoaQR3Sq+4GhviMe7XKA==$0 TABLE
    BIN$PXM7RjH1TA+aKmNIZi6mzw==$0 TABLE
    BIN$PdfPSnT0SKOgVY5Hbzx4Jw==$0 TABLE
    BIN$QFwqh7JuTkq2beCXCYoRLw==$0 TABLE
    BIN$QVTPpzylREyM3PpRCT0UDQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$R4Bv3C5zRhWTMh/XAx/2KA==$0 TABLE
    BIN$R9cZvlVtS7KzPphwGIt5Gw==$0 TABLE
    BIN$RIxAOkFPQE6u7EqgPwJnWg==$0 TABLE
    BIN$RXK2T9M3SDK1cij82SYZlQ==$0 TABLE
    BIN$RkXaj9jBS02AJQR5uw4f6Q==$0 TABLE
    BIN$S0DV4Q5fROmt7zjTLIleqw==$0 TABLE
    BIN$SFdD1HNmSBmVW/9DxQofdw==$0 TABLE
    BIN$ST8Gk12YQkaq7jHAqrUPqg==$0 TABLE
    BIN$T01LdE/ZRRubJ7oSg5bgEg==$0 TABLE
    BIN$T2+bN3rETXy720BfLhMVeg==$0 TABLE
    BIN$T43E2dSZQLqX2boS5PK63A==$0 TABLE
    BIN$TMU/SouMQUycLIi5reN8ZQ==$0 TABLE
    BIN$Ti22a824SJqmEHXKJj6w0Q==$0 TABLE
    BIN$U7J7paMrR1uJIhDfWego1A==$0 TABLE
    BIN$UE/iro5GRz+mXr7kRnWUsg==$0 TABLE
    BIN$Ubgtu31tRniD+IDtfT00jA==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$UtkZpYeWTrW6Sf3xAlne6g==$0 TABLE
    BIN$V2qJgTnTQIyvUMPr7h5RRw==$0 TABLE
    BIN$ViJ7Kik0TLGqAeIeJ6i1uQ==$0 TABLE
    BIN$Vpx4c6lZTay4jNZApIwpPg==$0 TABLE
    BIN$W8qbHkYSQsW6USn4GLpVMA==$0 TABLE
    BIN$XClNraUxT+OWtUmxXrmtUw==$0 TABLE
    BIN$XfAw1Dl4S22ALnZOEKO6tA==$0 TABLE
    BIN$YCNF/5tASjW76KWJTJxQCw==$0 TABLE
    BIN$YTmiD0HjR6uevG2yQfNeYg==$0 TABLE
    BIN$YvZ85To1Rwqe0cZfYZd1bg==$0 TABLE
    BIN$Z2nomMoHSLObzFe84bpoKw==$0 TABLE
    BIN$a05wHoD7TH+b0OZIwLdkFA==$0 TABLE
    BIN$ajL4kZDNQ5CH+sVmr2T3uA==$0 TABLE
    BIN$atcjr20dQ/6nb8nJqi1Hhg==$0 TABLE
    BIN$b5cHFRdDQXeFg64XlP9Xew==$0 TABLE
    BIN$d15FUyO2TKCriycrXZGTmA==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$ezJVvthuSTKv/5tt9grKEQ==$0 TABLE
    BIN$fOH4cEYiQGaXsIy15nVBGw==$0 TABLE
    BIN$g4NzBIhFQaOFtrMg6BDXVQ==$0 TABLE
    BIN$gXS+NIYBQXyphJBPTbAfSA==$0 TABLE
    BIN$gjHOrcQ+RbOd54VUs0PqGg==$0 TABLE
    BIN$glmeEmJMTWuC375rGhPK1A==$0 TABLE
    BIN$hYCNT27iQASpxFk3QQO/WA==$0 TABLE
    BIN$i1OXZRCTSlykIzrl5cUGqg==$0 TABLE
    BIN$ilvBQOWrSOSQT01J+5MXPw==$0 TABLE
    BIN$k9oizkOsQauMFQQqYuRTaA==$0 TABLE
    BIN$kI1JVjkGQ2GPm/XiGPZjZg==$0 TABLE
    BIN$l1aRH4jvRTy0/f2o0e0IqQ==$0 TABLE
    BIN$mLVINEGoSoGBum7bIktbnQ==$0 TABLE
    BIN$mev7cot5S+iyE1NAXO2+1A==$0 TABLE
    BIN$mvIUnpItSh2+a8QbDajP8g==$0 TABLE
    BIN$mzDGCMEkR7i8LzX6cyZb+w==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$n2RcVd3wRZC/MEZbb5kQIA==$0 TABLE
    BIN$nvkvgxFQQSqpwivA9QJb/g==$0 TABLE
    BIN$olOmi9DyTOSAUMgBhWTzuQ==$0 TABLE
    BIN$om8c9R5BRRCqMIw4b3HZ9g==$0 TABLE
    BIN$p+tEJvchSKu7JzCJCl9euA==$0 TABLE
    BIN$pXjKxK23TbSuBph8rq3KRA==$0 TABLE
    BIN$q94rmRwfRgWyJ+zEOM/ZDg==$0 TABLE
    BIN$qFJb6gFNQY+mz4BPGlynSw==$0 TABLE
    BIN$qTc68mzdSN+BIZx2WvtsRA==$0 TABLE
    BIN$qbVj2OhwQNGcMfUOmv+UYQ==$0 TABLE
    BIN$qcrcUgfySaGTMLi/Ep3e/g==$0 TABLE
    BIN$st0EpAavTA+e9rrnEUI2cw==$0 TABLE
    BIN$tO53xOkNT1eDSbkY8Gft5A==$0 TABLE
    BIN$tvOzHRf2QRat10N5tO460g==$0 TABLE
    BIN$ubyEf/qiQ+qZbQXY31UprQ==$0 TABLE
    BIN$v3Pn2G1SRbSb8mVo7ks+pQ==$0 TABLE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    BIN$vHz3VmLhTA6iSnyF2nXx3g==$0 TABLE
    BIN$wELTa61TQMCn0/8pSu2XHg==$0 TABLE
    BIN$whMlaC4+StmeUeoz4OfSrQ==$0 TABLE
    BIN$xGIBh0mVSeaEoufrjVZf1Q==$0 TABLE
    BIN$xL1AsuodQMq/lbz81N6bng==$0 TABLE
    BIN$xeyqm9LcRLWp3A0Ql4icvg==$0 TABLE
    BIN$yuOzs3yORmmNmcV93KC/Vg==$0 TABLE
    BONUS TABLE
    CUSTID SEQUENCE
    CUSTOMER TABLE
    DEMO_CUSTOMERS TABLE
    DEMO_CUST_SEQ SEQUENCE
    DEMO_ORDERS TABLE
    DEMO_ORDER_ITEMS TABLE
    DEMO_ORDER_ITEMS_SEQ SEQUENCE
    DEMO_ORD_SEQ SEQUENCE
    Hit <RETURN> to continue ...
    TABLE_NAME TABLE_TYPE
    DEMO_PRODUCT_INFO TABLE
    DEMO_PROD_SEQ SEQUENCE
    DEMO_STATES TABLE
    DEMO_USERS TABLE
    DEMO_USERS_SEQ SEQUENCE
    DEPT TABLE
    DUMMY TABLE
    EMP TABLE
    ITEM TABLE
    ORD TABLE
    ORDID SEQUENCE
    PRICE TABLE
    PRODID SEQUENCE
    PRODUCT TABLE
    SALES VIEW
    SALGRADE TABLE
    176 rows selected.
    SQL> select * from dept;
    Hit <RETURN> to continue ...
    DEPTNO DNAME LOC
    10 ACCOUNTING NEW YORK
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON
    4 rows selected.

  • Huge memory leaks in using PL/SQL tables and collections

    I have faced a very interesting problem recently.
    I use PL/SQL tables ( Type TTab is table of ... index by binary_integer; ) and collections ( Type TTab is table of ...; ) in my packages very widely. And have noticed avery strange thing Oracle does. It seems to me that there are memory leaks in PGA when I use PL/SQL tables or collections. Let me a little example.
    CREATE OR REPLACE PACKAGE rds_mdt_test IS
    TYPE TNumberList IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    PROCEDURE test_plsql_table(cnt INTEGER);
    END rds_mdt_test;
    CREATE OR REPLACE PACKAGE BODY rds_mdt_test IS
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    END;
    END rds_mdt_test;
    I run the following test code:
    BEGIN
    rds_mdt_test.test_plsql_table (1000000);
    END;
    and see that my session uses about 40M in PGA.
    If I repeat this example in the same session creating the PL/SQL table of smaller size, for instance:
    BEGIN
    rds_mdt_test.test_plsql_table (1);
    END;
    I see again that the size of used memory in PGA by my session was not decreased and still be the same.
    The same result I get if I use not PL/SQL tables, but collections or varrays.
    I have tried some techniques to make Oracle to free the memory, for instance to rewrite my procedure in the following ways:
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    x.DELETE;
    END;
    or
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    FOR indx in 1 .. cnt LOOP
    x.DELETE(indx);
    END LOOP;
    END;
    or
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    x TNumberList;
    empty TNumberList;
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    x(indx) := indx;
    END LOOP;
    x := empty;
    END;
    and so on, but result was the same.
    This is a huge problem for me as I have to manipulate collections and PL/SQL tables of very big size (from dozens of thousand of rows to millions or rows) and just a few sessions running my procedure may cause server's fall due to memory lack.
    I can not understand what Oracle reseveres such much memory for (I use local variables) -- is it a bug or a feature?
    I will be appreciated for any help.
    I use Oracle9.2.0.1.0 server under Windows2000.
    Thank you in advance.
    Dmitriy.

    Thank you, William!
    Your advice about using DBMS_SESSION.FREE_UNUSED_USER_MEMORY was very useful. Indeed it is the tool I was looking for.
    Now I write my code like this
    declare
    type TTab is table of ... index binary_integer;
    res TTab;
    empty_tab TTab;
    begin
    res(1) := ...;
    res := empty_tab;
    DBMS_SESSION.FREE_UNUSED_USER_MEMORY;
    end;
    I use construction "res := empty_tab;" to mark all memory allocated to PL/SQL table as unused according to Tom Kyte's advices. And I could live a hapy life if everything were so easy. Unfortunately, some tests I have done showed that there are some troubles in cleaning complex nested PL/SQL tables indexed by VARCHAR2 which I use in my current project.
    Let me another example.
    CREATE OR REPLACE PACKAGE rds_mdt_test IS
    TYPE TTab0 IS TABLE OF NUMBER INDEX BY BINARY_INTEGER;
    TYPE TRec1 IS RECORD(
    NAME VARCHAR2(4000),
    rows TTab0);
    TYPE TTab1 IS TABLE OF TRec1 INDEX BY BINARY_INTEGER;
    TYPE TRec2 IS RECORD(
    NAME VARCHAR2(4000),
    rows TTab1);
    TYPE TTab2 IS TABLE OF TRec2 INDEX BY BINARY_INTEGER;
    TYPE TStrTab IS TABLE OF NUMBER INDEX BY VARCHAR2(256);
    PROCEDURE test_plsql_table(cnt INTEGER);
    PROCEDURE test_str_tab(cnt INTEGER);
    x TTab2;
    empty_tab2 TTab2;
    empty_tab1 TTab1;
    empty_tab0 TTab0;
    str_tab TStrTab;
    empty_str_tab TStrTab;
    END rds_mdt_test;
    CREATE OR REPLACE PACKAGE BODY rds_mdt_test IS
    PROCEDURE test_plsql_table(cnt INTEGER) IS
    BEGIN
    FOR indx1 IN 1 .. cnt LOOP
    FOR indx2 IN 1 .. cnt LOOP
    FOR indx3 IN 1 .. cnt LOOP
    x(indx1) .rows(indx2) .rows(indx3) := indx1;
    END LOOP;
    END LOOP;
    END LOOP;
    x := empty_tab2;
    dbms_session.free_unused_user_memory;
    END;
    PROCEDURE test_str_tab(cnt INTEGER) IS
    BEGIN
    FOR indx IN 1 .. cnt LOOP
    str_tab(indx) := indx;
    END LOOP;
    str_tab := empty_str_tab;
    dbms_session.free_unused_user_memory;
    END;
    END rds_mdt_test;
    1. Running the script
    BEGIN
    rds_mdt_test.test_plsql_table ( 100 );
    END;
    I see that usage of PGA memory in my session is close to zero. So, I can judge that nested PL/SQL table indexed by BINARY_INTEGER and the memory allocated to it were cleaned successfully.
    2. Running the script
    BEGIN
    rds_mdt_test.test_str_tab ( 1000000 );
    END;
    I can see that plain PL/SQL table indexed by VARCHAR2 and memory allocated to it were cleaned also.
    3. Changing the package's type
    TYPE TTab2 IS TABLE OF TRec2 INDEX BY VARCHAR2(256);
    and running the script
    BEGIN
    rds_mdt_test.test_plsql_table ( 100 );
    END;
    I see that my session uses about 62M in PGA. If I run this script twice, the memory usage is doubled and so on.
    The same result I get if I rewrite not highest, but middle PL/SQL type:
    TYPE TTab1 IS TABLE OF TRec1 INDEX BY VARCHAR2(256);
    And only if I change the third, most nested type:
    TYPE TTab0 IS TABLE OF NUMBER INDEX BY VARCHAR2(256);
    I get the desired result -- all memory was returned to OS.
    So, as far as I can judge, in some cases Oracle does not clean complex PL/SQL tables indexed by VARCHAR2.
    Is it true or not? Perhaps there are some features in using such way indexed tables?

  • Insert / update data to a table through DBLINK (oracle)

    I try to insert / update a table from one instance of oracle database to another one through oracle dblink, get following error:
    java.sql.SQLException: ORA-01008: not all variables bound
    ORA-02063: preceding line from MYLINK
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
    at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:582)
    at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
    at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1144)
    at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2152)
    at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2035)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2876)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
    The same code to insert / update the exact same table in local instance works fine.No any binding problem. So i am pretty sure all ? mark in SQL are set with some value before sending to Oracle.
    Someone please advise what is possible problem. Db link is not set correctly? or we can not update remote table by dblink.
    By the way i can do insert / update from TOAD to the remote table through DBLINK. Problem happens only in Java code.
    thanks!
    Gary

    dblink links from one database instance to another.
    So it is certainly a source of possible problems when it works on one database and not another.
    You should start by looking at the dblink and it possible testing it in the database not via java.
    Note as well that that error suggests that it is coming from the Oracle database. I believe if you had a bind parameter problem in your java code that the error would come from the driver. But that is a guess on my part.

  • Can't update a sql-table with a space

    Hello,
    In a transaktion I'm getting some Values from a SAP-ERP System via JCO.
    I update a sql-table with this values with a sql-query command.
    But sometimes the values I get from SAP-ERP are empty (space) and I'm not able to update the sql-table because of a null-value exception. (The column doesn't allow null-values). It seems that MII thinks null and space are the same.
    I tried to something like this when passing the value to the sql-query parameter but it didn't work:
    stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
    stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
    this works but I don't want to have a "_"
    stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", "_")
    Any suggestions?
    thank you.
    Matthias

    The problem is Oracle doesn't know the space function. But it knows a similar function: NVL --> replaces a null value with something else. So this statement works fine for me:
    update marc set
    LGort = '[Param.3]',
    dispo = '[Param.4]',
    schgt = NVL('[Param.5]', ' '),
    dismm = '[Param.6]',
    sobsl = NVL('[Param.7]',' '),
    fevor = '[Param.8]'
    where matnr = '[Param.1]' and werks = '[Param.2]'
    If Param.5 or Param.7 is null Oracle replaces it with a space in every other case it is the parameter itself.
    Christian, thank you for your hint with the space function. So I remembered the NVL-function.
    Regards
    Matthias

  • Can Crystal Report XI update data in a SQL Table

    Post Author: abidamin
    CA Forum: Data Connectivity and SQL
    Hi,
    I have a very specific requirement to update a flag field in one of SQL2005 database tables, I need to update a One character field with Y on all selected records printed on the report as a result of running the report successuflly.
    Can anyone let me know if it is possible to update a SQL table field using Crystal Report XI.
    Regards

    Post Author: SKodidine
    CA Forum: Data Connectivity and SQL
    Perhaps this KBase article can be of some help.
    http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2011921&sliceId=&dialogID=18608077&stateId=1%200%2018610053

  • How to find out who made inserts/updates/deletes made to a SQL Table

    I want to know WHO MAKES INSERTS/UPDATES/DELETES TO a particular SQL Table. Bascially I want to AUDIT ANY Edites made to a SQL 2008 TABLE. I need info such as WHO AMDE THE Updates i.e. the user first/lastname, When update was made, what row was updated etc...How
    can I do that with SQL 2008?

    One way to achieve that would be to use triggers to detect when a change is made to the table, and then insert a record into another table/database detailing what changed and who by.
    You'd need three triggers, one for insert, update and delete respectively, and for each of those you use the "inserted" and "deleted" tables (system tables maintained by SQL) to retrieve what has been done. To retrieve who made the change you can query IDENT_CURRENT
    which returns the last identity value for a specific table.
    See :
    Triggers -
    http://msdn.microsoft.com/en-gb/library/ms189799(v=sql.100).aspx
    Inserted & deleted tables -
    http://technet.microsoft.com/en-us/library/ms191300(v=sql.100).aspx
    INDENT_CURRENT -
    http://technet.microsoft.com/en-us/library/ms175098(v=sql.100).aspx
    There may be better / more up to date ways to do this, but I've used this method successfully in the past, albeit a long time ago (on a SQL 2000 box I think!).

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Can any one please send me an update trigger (pl/sql procedure) for ap tables(ap_suppliers,ap_supplier_site_all,and contacts)

    Please send an query for update trigger for those tables .
         1: ap_suppliers
         2: ap_supplier_sites_all
         3: ap_supplier_contacts.
    Thanks,
    Chaitanya.

    Hi,
    Actually ID and Data are different names in my API. Here I mentioned like that.
    Am using Oracle 10g version.
    Yes I am going to get the multiple values using this Ref Cursor. The same ref cursor is used in another API of my package.
    In this API, the user actually enters Application_id and data. API should insert/update the version_master table with the inputs. See application_id is the foriegn key for app_master table.
    The requirement is whenever they enters application_id and data, if application_id already present in the version_master table, then the data should be updated and we should get a status flag for this using Out variable(i.e. using ref cursor only we are showing the status). if the application_id is not present in the version_master table, new record should be inserted. The sequence will generate the version_id for version_master table.
    But the Merge statement is working fine for update and insert also. Problem is am unable to see the success or failure through ref cursor. I don't know how exactly I can use this.
    If data is NULL the operation should be failed. i.e. I should get Failure status here. But am not getting this.
    Please remove the comments here and then check. If I use the NVL2 function I was able to get the status flag, i.e. S or F.
    OPEN resultset_o FOR
    SELECT NVL2 (data, 'S', 'F')
    FROM version_master
    WHERE application_id = application_id_i;
    1.How the value of data being not null will determine Success of the api and how null failure
    2.If the above select statement goes in to exception when others how I will no the failure
    I have to achieve the above scenarios.
    Please advice me.

  • Returning multiple pl/sql tables to VB using ADO + Oracle's OLE DB

    Windows XP
    VB 6
    ADO 2.7
    Oracle 9i Client (OLE DB 9.2.0.1)
    Oracle DB 8.1.7.2
    I have just upgraded a VB5/NT (RDO + MS ODBC for Oracle) app to VB6/XP (ADO + Oracle's OLE DB). The calls to stored procedures that returns tables are not working now. I get following error:
    -214721900 ORA-06550: line 1, column 42:
    PLS-00201:identifier 'LO_AUDIT_ID_TBL' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Please provide hint/help.

    Yes, the LO_AUDIT_ID_TBL is a variable (of table type) being returned from the stored procedure.
    I tried changing case of table is in pl/sql.
    I tried removing the table(s) from the Call statement...
    and I get error message that there are missing parameters.
    THANKS SO MUCH FOR YOUR HELP.
    I have been reading OLE DB User's guide in which there are examples of Ref Cursors and has no documentation regarding how to achieve same using tables (in stead of Ref Curs). I am also looking for documentation that would describe all different Registry attributes that could be turned on or off to do things, but have not been able to find any.
    I am trying to use the PLSQLRSet to retrieve rowsets from pl/sql tables. You can see that in my VB code below, in GetSPResultSet function.
    The VB Code is:
    Public Function Retrieve() As ADODB.Recordset
    Dim inparam(-2 To -1) As Variant 'set to be ignored by GetSPResultSet method
    Dim outparam(0) As Variant
    Dim strSQL As String
    strSQL = "{ CALL PckPLAudit.Sel_Smmry( ?,{resultset 1000, lo_audit_id_tbl, lo_audit_dt_tbl, lo_audit_type_tbl, " & _
    "lo_audit_status_tbl, lo_qty_selected_tbl, lo_qty_deselect_tbl, lo_qty_sent_tbl, lo_qty_follow_tbl, " & _
    "lo_qty_received_tbl, lo_qty_ncpl_tbl, lo_qty_security_tbl, lo_qty_closed_tbl, lo_qty_sentsec_tbl}, {resultset 1, lo_res_tbl} ) }"
    Set rdoRs = mConnection.GetSPResultSet(strSQL, inparam(), outparam())
    BuildCollection
    Set Retrieve = rdoRs
    End Function
    Public Function GetSPResultSet(ByVal szSQL As String, InParam() As Variant, OutParam() As Variant) As ADODB.Recordset
    '============================================================================
    'submits a call to a stored procedure that returns table output parameters.
    'out params are interpreted as ADODB.Recordset
    'szSQL : SQL call to stored procedure
    'InParam() : array of input parameter values
    'OutParam() : array of output parameter values set in this function
    '============================================================================
    Dim qry As New ADODB.Command
    Dim ParamIn As ADODB.Parameter
    Dim ParamOut As ADODB.Parameter
    Dim RS As ADODB.Recordset
    Dim inti As Integer
    Dim intj As Integer
    Dim blnret As Boolean
    Dim mErrors As New cErrors
    Dim retVal As Double
    'Dim itmp As Integer
    Dim ParmType As DataTypeEnum
    Dim i
    On Error GoTo errGetSPResultSet
    blnret = True
    Set qry = New ADODB.Command
    qry.ActiveConnection = mrdoCn
    qry.CommandType = adCmdText
    qry.CommandText = szSQL
    'load rdoParameter object(s) from InParam array if InParam exists
    For inti = 0 To UBound(InParam)
    'qry.Parameters(i).Value = InParam(inti)
    Set ParamIn = New ADODB.Parameter
    Select Case TypeName(InParam(inti))
    Case "Integer"
    ParmType = adDouble
    Case "Double"
    ParmType = adDouble
    Case "String"
    ParmType = adChar
    Case "Null"
    ParmType = adDouble
    Case "Date"
    ParmType = adDate
    Case "Long"
    ParmType = adDouble 'jks 12/19/2002
    End Select
    Set ParamIn = qry.CreateParameter(ParamIn, ParmType, adParamInput)
    ParamIn.Value = InParam(inti)
    If TypeName(InParam(inti)) = "Null" Then
    ParamIn.Size = 0
    Else
    ParamIn.Size = Len(InParam(inti))
    End If
    qry.Parameters.Append ParamIn
    Next
    For intj = 0 To UBound(OutParam)
    Set ParamOut = New ADODB.Parameter
    Select Case TypeName(OutParam(intj))
    Case "Integer"
    ParmType = adDouble
    Case "Double"
    ParmType = adDouble
    Case "String"
    ParmType = adChar
    Case "Null"
    ParmType = adEmpty
    Case "Empty"
    ParmType = adDouble
    Case "Date"
    ParmType = adDate
    Case "Long"
    ParmType = adDouble 'jks 12/19/2002
    End Select
    Set ParamOut = qry.CreateParameter(ParamOut, ParmType, adParamOutput, 255)
    qry.Parameters.Append ParamOut
    Next
    'execute the stored procedure call
    qry.Properties("PLSQLRSet") = True
    Set RS = qry.Execute() 'rdOpenStatic, rdConcurReadOnly
    qry.Properties("PLSQLRSet") = False'
    For intj = 0 To UBound(OutParam)
    OutParam(intj) = qry.Parameters.Item(inti)
    inti = inti + 1
    Next
    If OutParam(0) <> 0 Then
    If OutParam(0) = 999 Then
    i = mErrors.DisplayError(Val(OutParam(0)), "SAM")
    Else
    MsgBox "Database returned error code " & OutParam(0) & "." & vbCrLf & " Unable to complete operation. "
    End If
    blnret = False
    End If
    If blnret Then
    Set GetSPResultSet = RS
    Else
    Set GetSPResultSet = Nothing
    End If
    Set RS = Nothing
    Set qry = Nothing
    Set ParamIn = Nothing
    Set ParamOut = Nothing
    exitGetSPResultSet:
    Exit Function
    errGetSPResultSet:
    blnret = ProcessError(Err)
    If Not blnret Then Set GetSPResultSet = Nothing
    Resume exitGetSPResultSet
    End Function
    The stored procedure is:
    CREATE OR REPLACE PACKAGE BODY D5750PGM.PckPLAudit IS
    PROCEDURE Sel_Smmry (
         lo_res_cd          out     number,
         LO_AUDIT_ID_TBL          out     pckclaudit.audit_id_tbl%type,
         lo_audit_dt_tbl          out     pckclaudit.audit_dt_tbl%type,
    lo_audit_type_tbl     out     pckclaudit.audit_type_tbl%type,
         lo_audit_status_tbl     out     pckclaudit.audit_status_tbl%type,
         lo_qty_selected_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_deselect_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_sent_tbl          out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_follow_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_received_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_ncpl_tbl          out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_security_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_closed_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_qty_sentsec_tbl     out     pckclaudit.audit_smmry_qty_tbl%type,
         lo_res_tbl          out     pcktbtable_type.res_tbl%type
    IS
    BEGIN
         PckAudit.Sel_Smmry (pckclglobal.lg_pl_proc, lo_res_cd,
         lo_audit_id_tbl,
         lo_audit_dt_tbl,
    lo_audit_type_tbl,
         lo_audit_status_tbl,
         lo_qty_selected_tbl,
         lo_qty_deselect_tbl,
         lo_qty_sent_tbl,
         lo_qty_follow_tbl,
         lo_qty_received_tbl,
         lo_qty_ncpl_tbl,
         lo_qty_security_tbl,
         lo_qty_closed_tbl,
         lo_qty_sentsec_tbl,
         lo_res_tbl
    END Sel_Smmry;
    END PckPLAudit;
    also, pckclaudit.audit_id_tbl%type is defined as
    TYPE audit_id_tbl_type IS TABLE OF disb_audit.disb_audit_id%TYPE
         INDEX BY BINARY_INTEGER ;
    and disb_audit.disb_audit_id%TYPE is defined as
    CREATE TABLE D5750.DISB_AUDIT
    DISB_AUDIT_ID NUMBER(9,0) NOT NULL,
    AUDIT_DT DATE NOT NULL,
    AUDIT_CODE_TYPE_ID VARCHAR2(5) NOT NULL,
    AUDIT_CODE_ID VARCHAR2(2) NOT NULL,
    CRTN_ID VARCHAR2(8) NOT NULL,
    CRTN_DT_TM DATE NOT NULL,
    etc.

Maybe you are looking for

  • ICal delegation failing after upgrade from Snow Leopard to Lion

    I've just upgraded our Snow Leopard server to run Lion Server. I have a problem with iCal Server. Individual calendars work OK: can be accessed from iCal / iThings and so on, and via web interface.  But calendar delegation doesn't. If I open Accounts

  • Using java.sql.Time: Offset by 1 hour?

    I have a problem understanding the behaviour of the java.sql.Time class. As the following example shows. 61952000 ms is the Time 17:12:32. If i feed a Time-Object with it and print the time or date I'll get "18:12:32", an offset of 1h. But if I use t

  • How to implement programs written in j2me to real mobile phones..

    hi, As i'm new to this technology I wonder how I can run my program in the real mobile phones. What are the things required to transfer codes from the computer to mobile phones and what is required to run those programs in the mobile phones... regard

  • APP related

    Hi Experts, Im facing problem while making payment.... Example: I hav credited vendor  for rs.100/-  & also debited with rs.10/- ,,,,,net of rs.90 /- i wan to make payment thru APP.but i dont want to do manual clearing thru T.code:f.51 or f.44...i wa

  • Expense Report - Paid-Then Withdrawn and Resubmitted.

    Hi to All, Ran into a particular problem with an expense report, where the WF has errored out. Would like to save the WF before having user withdraw and resubmit new expense report. Problem: End user created expense report, submitted, approved, invoi