SQLJ calling PL/SQL with records and tables as parameters

Has anyone used sqlj to to call procedures with records and
tables as IN, OUT, or INOUT as parameters? If so how do you
assign values to the IN parameter in the record/tables, and get
values out of the record/table when it is passed back? Might
anyone have any syntax?
null

One thing I forgot to mention: If you're an 8i client, then in
8.1.6 you'll be able to use JPublisher to solve this problem,
since it'll generate these wrappers for you.
Pierre
Oracle Product Development Team wrote:
: Hi,
: The key issue is that no part of Oracle code except PL/SQL is
: aware of the PL/SQL Record types and PL/SQL "index-by" table
: types.
: So the only way to call a PL/SQL procedure with args of a
RECORD
: or "index-by" table types is from another PL/SQL routine.
: In most cases, it's possible to work-around this by wrappering
: your PL/SQL method with another which doesn't have this issue.
: For example, if you're trying to call procedure proc01 in:
: package pack01 is
: type rec01 is record(n1 number, d1 date);
: procedure proc01 (r rec01);
: end;
: you can create a wrapper method:
: package pack01_wrapper is
: procedure proc01_wrapper (n1 number, d1 date);
: end;
: package body pack01_wrapper is
: procedure proc01_wrapper (n1 number, d1 date) is
: r pack01.rec01;
: begin
: r.n1 := n1;
: r.d1 := d1;
: pack01.proc01;
: end;
: end;
: If you're a 7.3 client, that's about all you can do. The Fix
was
: introduced in 8.0, where new structured types (ADT's) and new
: table types (VARRAY's and Nested tables) were introduced. So
if
: you're an 8.0 client, your 'wrapper' package could use an ADT
: which has the same attributes as the record, rather than
: 'exploding' the record into its individual components as I
showed
: above.
: Hope this helps!
: Pierre
: Thomas Richardson (guest) wrote:
: : Has anyone used sqlj to to call procedures with records and
: : tables as IN, OUT, or INOUT as parameters? If so how do you
: : assign values to the IN parameter in the record/tables, and
get
: : values out of the record/table when it is passed back? Might
: : anyone have any syntax?
: Oracle Technology Network
: http://technet.oracle.com
Oracle Technology Network
http://technet.oracle.com
null

Similar Messages

  • RECORDS AND TABLES

    CAn any explain why records and tables are used in PL/SQL?

    One thing I forgot to mention: If you're an 8i client, then in
    8.1.6 you'll be able to use JPublisher to solve this problem,
    since it'll generate these wrappers for you.
    Pierre
    Oracle Product Development Team wrote:
    : Hi,
    : The key issue is that no part of Oracle code except PL/SQL is
    : aware of the PL/SQL Record types and PL/SQL "index-by" table
    : types.
    : So the only way to call a PL/SQL procedure with args of a
    RECORD
    : or "index-by" table types is from another PL/SQL routine.
    : In most cases, it's possible to work-around this by wrappering
    : your PL/SQL method with another which doesn't have this issue.
    : For example, if you're trying to call procedure proc01 in:
    : package pack01 is
    : type rec01 is record(n1 number, d1 date);
    : procedure proc01 (r rec01);
    : end;
    : you can create a wrapper method:
    : package pack01_wrapper is
    : procedure proc01_wrapper (n1 number, d1 date);
    : end;
    : package body pack01_wrapper is
    : procedure proc01_wrapper (n1 number, d1 date) is
    : r pack01.rec01;
    : begin
    : r.n1 := n1;
    : r.d1 := d1;
    : pack01.proc01;
    : end;
    : end;
    : If you're a 7.3 client, that's about all you can do. The Fix
    was
    : introduced in 8.0, where new structured types (ADT's) and new
    : table types (VARRAY's and Nested tables) were introduced. So
    if
    : you're an 8.0 client, your 'wrapper' package could use an ADT
    : which has the same attributes as the record, rather than
    : 'exploding' the record into its individual components as I
    showed
    : above.
    : Hope this helps!
    : Pierre
    : Thomas Richardson (guest) wrote:
    : : Has anyone used sqlj to to call procedures with records and
    : : tables as IN, OUT, or INOUT as parameters? If so how do you
    : : assign values to the IN parameter in the record/tables, and
    get
    : : values out of the record/table when it is passed back? Might
    : : anyone have any syntax?
    : Oracle Technology Network
    : http://technet.oracle.com
    Oracle Technology Network
    http://technet.oracle.com
    null

  • Defining Record and Table Types

    Is there a good tutorial out there somewhere that provides good examples on how to define and work with Record and Table Types? How to define and work with an entire record or table as opposed to just a variable?
    For instance- I'd like to create a cursor of records from a table, loop through each record to examine variable values, and in some instances insert those entire records into another table.
    Thanks in advance for any suggestions.

    Oracle documentation is excellent (Lots of live examples that can be cutNpaste) place to start.
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96624/05_colls.htm
    Is there any thing specific you are looking for?
    vr,
    Sudhakar B.

  • Calling stored procedure with struct and boolean parameter

    Hi all,
    I am trying to write an EJB method using eclipselink that has to call a stored procedure which has the following parameters:
    - an object type (in/out)
    - a date (in)
    - another date (in)
    - a boolean (optional, in)
    - a number (out)
    - a string (out)
    When using StoredProcedureCall, I succeed in passing the dates and the object type (as a STRUCT) into the procedure and read out the output variables. I can also do this using NamedStoredProcedureCall and only map the number and string in a result class. Drawbacks of NamedStoredProcedureCall:
    - I cannot map the object type that comes back out (working example, anyone?)
    - I cannot specify the boolean input variable
    The problem is when I want to specify the boolean. In StoredProcedureCall, this is not possible since this only accepts native JDBC parameters. So I tried our PLSQLStoredProcedureCall.
    Here, I can specify all in/out parameters except the object type! No matter what I try, I seem to end up with ORA-3115 - unsupported network datatype or representation. Does anyone have a working example on how to use this?
    Regards,
    Jeroen van Veldhuizen
    REDORA B.V.

    The problem is not that I want to pass in a boolean. When I try to use PLSQLStoredProcedure, I do not succeed in passing in/out an object type (or STRUCT). It looks like the code has been made to access PLSQL record and table types by wrapping them in an object type, but it seems not to be possible to to use an object type directly.
    To start with: when you create a STRUCT parameter, the generated sql code is this:
    DECLARE
      l_param_in STRUCT := :1;and since struct is not a datatype, this fails.
    Jeroen

  • Definitions of record and table type

    I’m confused with the definition of record and table type. Below is my understanding, Please correct me if anything wrong. Thanks in advance!
    Record type can only hold one record with multiple fields.
    Table type is an array (multiple records) with only one field
    Table type defined with %rowtype (table of records) is an array of multiple records with multiple fields.

    I am not sure that I understand what you are asking. I have not heard the term table type before.
    However, I think a record type is more closely aligned to the %rowtype declaration. Maybe a collection is what you are looking for with the term table type.
    From the Oracle 10g documentation:
    %ROWTYPE
    In PL/SQL, records are used to group data. A record consists of a number of related fields in which data values can be stored. The %ROWTYPE attribute provides a record type that represents a row in a table. The record can store an entire row of data selected from the table or fetched from a cursor or cursor variable.
    Columns in a row and corresponding fields in a record have the same names and datatypes. In the example below, you declare a record named dept_rec. Its fields have the same names and datatypes as the columns in the dept table.
    DECLARE
    dept_rec dept%ROWTYPE; -- declare record variable

  • Operating System Calls from APEX with Java and PL/SQL

    Question about operating system calls from apex.
    I created a java file which is wrapped with pl/sql like
    create or replace java source named "ExternalCall" as
    import java.io.*;
    I do the steps from this web page http://www.oracle.com/global/de/community/tipps/oscalls/index.html
    The page is in german, but for experienced users the code on this page says everything.
    In apex i have an application which calls this function with the "move" command in a sql-report region.
    Let's say move c:\work1\file.txt c:\work2\file.txt
    Everything works fine on one host(pc) but if i want to transfer the file from my host to another one then
    i get the messgage "no access" although i have read, write access on the other host.
    By the way, on both hosts i have admin rights.
    Why can't i transfer the file over a network ?
    Thanks in advance for any kind of help.
    Regards
    Stefan

    I guess you are working on a Windows host. In this case Oracle processes are running as Windows services with a build-in MS system account. This account has no access to network ressources. You have two ways to get out of your windows box:
    Assign Oracle services a network enabled account, e.g. domain user with local administrator privileges. (I never tried this and I don't like to recommend it.)
    Use a command script for copying files and use explicite authentication within this script:-
    net use \\myserver\ipc$ tiger /user:scott
    copy c:\temp\xxx1 \\myserver\share\temp
    copy c:\temp\xxx2 \\myserver\share\temp
    Michael

  • Simple test case with NL and table order .

    Hi,
    did some tests on my 9.2.0.8 and got few questions:
    SQL> select count(*)  from p;
      COUNT(*)
          2000
    SQL> select count(*)  from c;
      COUNT(*)
          1000
    SQL> select count(*) , id from p group by id having count(*) > 1;
    no rows selected
    SQL> select count(*) , id from c group by id having count(*) > 1;
      COUNT(*)         ID
           100         10
    SQL> desc p
               Name
        1      ID number
        2      FILLER varchar2(100)
    SQL> desc c
               Name
        1      ID number
        2      FILLER varchar2(100)
    Got 10046 traces:
    case A
    select /*+ use_nl(p) leading(c) */ *
    from
    p , c where p.id = c.id and c.id in (10)
    Rows     Row Source Operation
        100  TABLE ACCESS BY INDEX ROWID P
        201   NESTED LOOPS
        100    TABLE ACCESS BY INDEX ROWID C
        100     INDEX RANGE SCAN C_ID (object id 411255)
        100    INDEX RANGE SCAN P_ID (object id 411256)
    Case B optimal
    select /*+ use_nl(c) leading(p) */ *
    from
    p , c where p.id = c.id and c.id in (10)
    Rows     Row Source Operation
        100  TABLE ACCESS BY INDEX ROWID C
        102   NESTED LOOPS
          1    TABLE ACCESS BY INDEX ROWID P
          1     INDEX RANGE SCAN P_ID (object id 411256)
        100    INDEX RANGE SCAN C_ID (object id 411255)So its simple nested loop with postponed inner table access .
    Why in row source operation we have got 102 rows (NL level) ? (It means NL was executed 102 times ?)
    And why 201 in other case ?
    Regards
    GregG

    I am not sure about the calculation/reason for those A-ROWS figures but the NL operation executes only once (but accesses inner rowsource 100 times in case one and once in second case) in both cases (which is as expected).
    A closer test case (to OP) is
    SQL> select * from v$version ;
    BANNER                                                                                                                                                                    
    Oracle Database 10g Release 10.2.0.5.0 - Production                                                                                                                       
    PL/SQL Release 10.2.0.5.0 - Production                                                                                                                                    
    CORE     10.2.0.5.0     Production                                                                                                                                                
    TNS for Linux: Version 10.2.0.5.0 - Production                                                                                                                            
    NLSRTL Version 10.2.0.5.0 - Production                                                                                                                                    
    SQL> create table p nologging as select level as id, cast(dbms_random.string('a', 100) as varchar2(100)) as filler from dual connect by level <= 2000 ;
    Table created.
    SQL> exec dbms_stats.gather_table_stats(user, 'P') ;
    PL/SQL procedure successfully completed.
    SQL> create index p_id on p(id) nologging ;
    Index created.
    SQL> select count(*)  from p;
      COUNT(*)                                                                                                                                                                
          2000                                                                                                                                                                
    SQL> select count(*) , id from p group by id having count(*) > 1;
    no rows selected
    SQL> create table c nologging as select level as id, cast(dbms_random.string('a', 100) as varchar2(100)) as filler from dual connect by level <= 900 union all select 10, cast(dbms_random.string('a', 100) as varchar2(100)) as filler from dual connect by level <= 99 ;
    Table created.
    SQL> select count(*) , id from c group by id having count(*) > 1;
      COUNT(*)         ID                                                                                                                                                     
           100         10                                                                                                                                                     
    SQL> exec dbms_stats.gather_table_stats(user, 'C') ;
    PL/SQL procedure successfully completed.
    SQL> create index c_id on c(id) nologging ;
    Index created.
    SQL> select /*+ use_nl(p) leading(c) gather_plan_statistics */ * from p , c where p.id = c.id and c.id in (10) ;
            ID FILLER                                                                                                       ID                                                
    FILLER                                                                                                                                                                    
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    zrGZSmUFXNyNMOViUYSvPDdfznSlMvaFnQakopPtcBvXQkWmMlWCnrPyeZLfhuLLeYyAEkcwZNSfoASLYpoAnpESqlQWkaEGatXV                                                                      
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    hKtrWPCfAmWWLGMXfwHCusSwVpehEnZdxYPLouIuBlMMiSKlIJWwklZCAXZaCbIxKlhzBVRhhTPdLcheyAdoYyfxwomqWRrMXuMk                                                                      
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    ncSqclZvOGgyXDPaaouGaUqXmJtFNbNyFzUalDknEMvTsBRwGmTxOCIalLvqMnuTFBZJGzNfBqaSVHUtvNDceVZqKQQyqeGKOUdz                                                                      
    100 rows selected.
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST')) ;
    PLAN_TABLE_OUTPUT                                                                                                                                                         
    SQL_ID  1f55m4rabtu3h, child number 0                                                                                                                                     
    select /*+ use_nl(p) leading(c) gather_plan_statistics */ * from p , c where p.id = c.id and                                                                              
    c.id in (10)                                                                                                                                                              
    Plan hash value: 2553281496                                                                                                                                               
    | Id  | Operation                     | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |                                                                 
    |   0 | SELECT STATEMENT              |      |      0 |        |      0 |00:00:00.01 |       0 |      0 |                                                                 
    |   1 |  TABLE ACCESS BY INDEX ROWID  | P    |      1 |      1 |    100 |00:00:00.01 |     112 |      2 |                                                                 
    |   2 |   NESTED LOOPS                |      |      1 |      1 |    201 |00:00:00.02 |     110 |      2 |                                                                 
    |   3 |    TABLE ACCESS BY INDEX ROWID| C    |      1 |      1 |    100 |00:00:00.01 |       7 |      1 |                                                                 
    |*  4 |     INDEX RANGE SCAN          | C_ID |      1 |      1 |    100 |00:00:00.01 |       3 |      1 |                                                                 
    |*  5 |    INDEX RANGE SCAN           | P_ID |    100 |      1 |    100 |00:00:00.01 |     103 |      1 |                                                                 
    Predicate Information (identified by operation id):                                                                                                                       
       4 - access("C"."ID"=10)                                                                                                                                                
       5 - access("P"."ID"=10)                                                                                                                                                
    24 rows selected.
    SQL> select /*+ use_nl(c) leading(p) gather_plan_statistics */ * from p , c where p.id = c.id and c.id in (10) ;
            ID FILLER                                                                                                       ID                                                
    FILLER                                                                                                                                                                    
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    zrGZSmUFXNyNMOViUYSvPDdfznSlMvaFnQakopPtcBvXQkWmMlWCnrPyeZLfhuLLeYyAEkcwZNSfoASLYpoAnpESqlQWkaEGatXV                                                                      
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    hKtrWPCfAmWWLGMXfwHCusSwVpehEnZdxYPLouIuBlMMiSKlIJWwklZCAXZaCbIxKlhzBVRhhTPdLcheyAdoYyfxwomqWRrMXuMk                                                                      
            10 opKRJynLxjeCiOScvOklQBXfpnfgvlhHNLzlKKrFaNzQLODKSnKMxpzecqyFkVSLvdosZJhWckBcQbpIaqttahlqBxrugKQVrnIk         10                                                
    ncSqclZvOGgyXDPaaouGaUqXmJtFNbNyFzUalDknEMvTsBRwGmTxOCIalLvqMnuTFBZJGzNfBqaSVHUtvNDceVZqKQQyqeGKOUdz                                                                      
    100 rows selected.
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST')) ;
    PLAN_TABLE_OUTPUT                                                                                                                                                         
    SQL_ID  7hvf1zvsvfhdp, child number 0                                                                                                                                     
    select /*+ use_nl(c) leading(p) gather_plan_statistics */ * from p , c where p.id =                                                                                       
    c.id and c.id in (10)                                                                                                                                                     
    Plan hash value: 2133717140                                                                                                                                               
    | Id  | Operation                     | Name | Starts | E-Rows | A-Rows |   A-Time   | Buffers |                                                                          
    |   0 | SELECT STATEMENT              |      |      0 |        |      0 |00:00:00.01 |       0 |                                                                          
    |   1 |  TABLE ACCESS BY INDEX ROWID  | C    |      1 |      1 |    100 |00:00:00.01 |      11 |                                                                          
    |   2 |   NESTED LOOPS                |      |      1 |      1 |    102 |00:00:00.01 |       7 |                                                                          
    |   3 |    TABLE ACCESS BY INDEX ROWID| P    |      1 |      1 |      1 |00:00:00.01 |       4 |                                                                          
    |*  4 |     INDEX RANGE SCAN          | P_ID |      1 |      1 |      1 |00:00:00.01 |       3 |                                                                          
    |*  5 |    INDEX RANGE SCAN           | C_ID |      1 |      1 |    100 |00:00:00.01 |       3 |                                                                          
    Predicate Information (identified by operation id):                                                                                                                       
       4 - access("P"."ID"=10)                                                                                                                                                
       5 - access("C"."ID"=10)                                                                                                                                                
    24 rows selected.
    SQL> drop table p purge ;
    Table dropped.
    SQL> drop table c purge ;
    Table dropped.
    SQL> spool offEdited by: user503699 on Jan 18, 2012 11:49 PM

  • Calling a sql server sproc and function from oracle gateway

    Hello ,
    i am new to oracle gateway,
    we are trying to call a sql server 2008 stored procedure and function which return result set like a table result set.
    Can you please share some syntax of how to do it.
    and capture the data set and loop through or output it.
    Thanks
    madhu

    On My Oracle Support you find some notes how to do that. The first one is
    Different Methods For Calling MS SQL Server Procedures Using DG4MSQL (Doc ID 197192.1)
    and a note using result sets (it was written fir the Sybase gateway but works the same way for DG4MSQL) is:
    How to Call a Remote Sybase Procedure Using DG4SYBS (Doc ID 351400.1)
    - Klaus

  • Windows 10 Calls dropped problem with recording device

    I now there are others experiencing this issue. Though, however not only when either I call someone or they call me the call drops and "problem with recording device" error message is displayed. It is also stating to those trying to call me or answering my call that I can only accept IMs.Can someone please help as its starting to become a complete waste of my time. I am running Windows 10 and Skype Version: 7.7.0.103  

    Please, run the DirectX diagnostics tool (32-bit). Run dxdiag.exe (Start - Run or Win key +R) then press enter or click "OK". Once the diagnostics completes, "Save All information..." to a text file. Please, attach this file to your post. Be aware that you will have to zip this file before attaching it here.
    (i.e. compress DxDiag.txt ---> DxDiag.zip) 

  • Issue with clientListener and table

    Hi all,
    I have a jsf fragments (.jsff) page that has a table.
    I had used clientListener and serverListener in the table for my use case but whenever i load the page, iam not able to see any records in table. when i refresh the page the records are populated.
    When i remove "clientListener and serverListener" from table on first load of page ,records are populated.
    I had tried by giving partial refresh for table too but nothing is working.Is this bec of <af:clientListener> affecting the table to display records?
    Regards,
    Suresh kumar.k

    Hi ,
    I tried to implement Doubleclick for table records.On Dbclick the record detail should come in popup.
    The implementation is working fine.I had referred this link
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf
    Code from pagedef.
    My query is y the table is working fine if i remove clientlistner and serverlistner from table?
    <iterator Binds="LogError" RangeSize="25" DataControl="AppModuleDataControl"
    id="LogErrorIterator" ChangeEventPolicy="ppr"/>
    <searchRegion Binds="LogErrorIterator" Criteria=""
    Customizer="oracle.jbo.uicli.binding.JUSearchBindingCustomizer"
    id="LogErrorQuery"/>
    <tree IterBinding="LogErrorIterator" id="LogError">
    <nodeDefinition DefName="Entsys.view.LogErrorView" Name="LogError0">
    <AttrNames>
    <Item Value="TransactionId"/>
    <Item Value="TransactionVersion"/>
    <Item Value="EntryDate"/>
    <Item Value="Status"/>
    <Item Value="SouceSystemName"/>
    <Item Value="TargetSystemName"/>
    </AttrNames>
    </nodeDefinition>
    </tree>
    Regards
    Suresh kumar.k

  • Using expdp to export a mix of tables with data and tables without data

    Hi,
    I would like to create a .dmp file using expdp, exporting a set of tables with data and another set without data. Is there a way to do this in a single .dmp file? For example, I want all the tables in a schema with data, but for the fact tables in that schema, I only want the fact table objects, not the data. I thought it might be easier to create two separate .dmp files, one for each scenario, but would be nice to have one .dmp file that satisfies my requirement. Any help is appreciated.
    Thanks,
    -Rodolfo
    Edited by: user6902559 on May 11, 2010 12:05 PM

    You could do this with where clauses. Let's say you have 10 tables to export, 5 with data and 5 without data. I would do it like this
    tab1_w_data
    tab2_w_data
    tab3_w_data
    tab4_w_data
    tab5_w_data
    tab1_wo_data
    tab2_wo_data
    tab3_wo_data
    tab4_wo_data
    tab5_wo_data
    I would make one generic query
    query="where rownum = 0"
    and I would make 5 specific queries
    query=tab1_w_data:"where rownum > 0"
    query=tab2_w_data:"where rownum > 0"
    query=tab3_w_data:"where rownum > 0"
    query=tab4_w_data:"where rownum > 0"
    query=tab5_w_data:"where rownum > 0"
    The first query will be applied to all tables that don't have their own specific query and it will export no rows, the next 5 will apply to each of the corresponding table.
    Dean

  • Question on rectangle with graph and table

    i inserted the graph chart and table in a rectangle for similar values... but when i see the preview of this scenario... its showing seperately.... its mean that first showing the rectangle and then graph and then table in the preview page. when i saved
    it into PDF; both chart and table are coming in same rectangle.
    can any one please give a quick response to this.

    Hi  Nagalinga,
    Based on my understanding, you create a chart and table with same values, then you use a rectangle to contain them. When previewing the report, rectangle, chart, table displays separately. However, when exporting to PDF, the chart and table display in a
    same rectangle.
    In Reporting Service, rectangles can be used as containers to help control the way data regions render in a report. However, a rectangle is only a container for items that you either create in the rectangle or drag into the rectangle. If you draw a rectangle
    around an item that already exists on the design surface, the rectangle will not act as its container. So in your scenario, I suppose you create a chart and table then draw a rectangle around them, rectangle, chart and table will display separately when previewing
    report. As we tested in our environment, we create a chart and table with same values, then drag them into a rectangle, the chart and table both display in a rectangle whether we preview the report or render the report as PDF. Please refer to the screenshots
    below:
    Reference:
    Rectangles and Lines (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • What is the difference between READ TABLE ITAB WITH KEY  and  TABLE KEY

    Hi Experts,
    what is the difference between
    READ TABLE <ITAB> WITH KEY <K1> = <C1>
                                                    <Kn> = <Cn> .
    and 
    READ TABLE <ITAB> WITH TABLE KEY <K1> = <C1>
                                                              <Kn> = <Cn> .
    Thanks
    Akash.

    Hi akashdeep,
    Nice question. I also tried to find out, but no much success. My opinion is that for practical purposes there is no difference.
    It may have difference in case of searching, especially sorted tables. (binary search or normal linear search).
    Case1: If our table is sorted table with defined key fields, and we give WITH TABLE KEY, then faster binary search is used.
    Case2 : If our table is sorted table with defined key fields, and we give WITH  KEY, (and no field contained in the keys), then normal linear search is used.
    regards,
    amit m.

  • Please help me with recording and playing audio simultaneously!!!

    Right now I can either play the incoming stream OR record it. I tried making Clones for datasource like :
    DataSource clone1 = Manager.createCloneableDataSource(originalSource);
    Then I pass it to these 2 classes:
    new playThread(clone1).run;
    new recordThread(clone1).run;
    playThread is a Thread class that will take the cloned datasource and then plays it while recordThread will record the incoming datasource. Here is what happens when i run them one after another:
    When I run playThread before recordThread I get ACM driver error. But if I run the recordThread before playThread the playThread's playerWindow shows up and plays for a split second then stops; The recordThread does record all the incoming stream though... Here are my questions....
    1. Anyone know what my problem is? is it resource alocation? Threading problem?
    2. Did I use the clone datasource correctly? I tried making clone1, clone2 but those didnt work well either...Should I do anything to the clones for record and play? all I did was pass them to the 2 classes and those classes just use them straight out without proccessing or anything...
    Please help me out!!!! thanks a bunch!

    i dont think it is... i tried the clone thing but samething happened... it might be a Thread problem since when i put those together sometimes record runs sometimes player runs... and at the end i get "ERROR while querying ACM driver's information" error..... i am really confused...
    DataSource clone1 = Manager.createCloneableDataSource(originalSource);
    DataSource clone2 = Manager.createCloneableDataSource(clone1);
    playerThread play= new playerThread(clone1);
    recordThread record= new recordThread(clone2);
    record.start();
    broad.start();
    anyone can help is appreciated

  • Help!! Calling PL/SQL with table of objects params

    Hi JDBC experts,
    This is probably a familiar problem to many of you and I was hoping you can help me.
    I have a JDBC application that makes calls to a PL/SQL stored procedure that accepts and returns tables (arrays) of objects. I have an equivalent representation of these in Java (the object is a simple Java class and the array of objects is a subclass of ArrayList). The object has around 10 attributes (varchar and number) and the call typically accepts and returns between 50 and 100 objects.
    I noticed that converting from one representation to the other before and after the JDBC call is very time consuming. Before calling the procedure, I need to instantiate a new oracle.sql.ARRAY and fill it with oracle.sql.STRUCT equivalents for each object in my ArrayList. After the procedure call returns, I need to instantiate a new ArrayList and fill it with my Java object representation for each oracle.sql.STRUCT in the returned oracle.sql.ARRAY. Given the # of objects returned and the size of each object, this causes performance degradation.
    Is there any way I can avoid the above conversion overhead? I was reading somewhere about jpub and CustomDatum. I tried it out but the code that sqlj generated looked rather complex - but if this is the recommended approach, I can follow that.
    Also, are there any java code examples for dealing with table of (non-scalar) objects with CustomDatum? I saw some code for using CustomDatum with single objects but not with a table of objects.
    Your help is much appreciated!
    Thanks,
    Niranjan

    I would do it like this :
    - use existsNode function in the filter predicate to look for candidate rows regardless of the number of occurrences of target nodes in the document
    - use XPath predicates on attributes to restrict target nodes
    SQL> create table temp1 of xmltype;
    Table created
    SQL>
    SQL> insert into temp1 values(xmlparse(document
      2  '<soc id="2">
      3   <listsectii>
      4    <sectie cods="4">
      5     <prodv codp="2" cant=""></prodv>
      6    </sectie>
      7    <sectie cods="5">
      8     <prodv codp="8"></prodv>
      9    </sectie>
    10    <sectie cods="6">
    11     <prodv codp="2"></prodv>
    12    </sectie>
    13   </listsectii>
    14  </soc>'));
    1 row inserted
    SQL>
    SQL> update temp1
      2  set object_value =
      3      updateXML( object_value
      4               , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]/@cant'
      5               , 'new_cant' )
      6  where existsNode( object_value
      7                  , '/soc/listsectii/sectie[@cods="4"]/prodv[@codp="2"]' ) = 1
      8  ;
    1 row updated
    SQL> select * from temp1;
    SYS_NC_ROWINFO$
    <soc id="2">
      <listsectii>
        <sectie cods="4">
          <prodv codp="2" cant="new_cant"/>
        </sectie>
        <sectie cods="5">
          <prodv codp="8"/>
        </sectie>
        <sectie cods="6">
          <prodv codp="2"/>
        </sectie>
      </listsectii>
    </soc>
    Of course, that implies there's already an existing "cant" attribute (not the case in your samples).
    If you actually need to create one, then you must use insertChildXML() instead.

Maybe you are looking for

  • Lightroom 4.1 Keywording

    I've just noticed that all of my imported images in Lightroom 4 have been tagged with the words 'Aircraft' and 'Transport'. When I type either of these into the Lightroom search box it brings up hundreds of images none of which display either of the

  • How to display the value of a javascript variable in a html region ?

    Hello, I need to display my page title or name in a html region. I added a script in the <title> section of the template header... : (thanks Andy : Get page name from page attributes ? <script type="text/javascript"> var pageTitle = '#TITLE#'; </scri

  • Flash not playing/showing when embedded in DW

    I'm getting back into doing web work after a 8 year lay off, so I may be doing something really basic wrong. However, I believed embedding my .swf file into my web page was so simple, even somebody with completely out of date knowledge could do it. I

  • Frozen screens - iPod with dock connector

    My ipod freezes up whenever it is disconnected from the computer. The Ok to disconnect doesn't go away. If I perform a reset, the apple logo doesn't disappear. I have restored my ipod many times to no avail. I can synch songs to it, and even play the

  • Replacing a failed UCS FI node

    We've had a hardware failure on one of our FI nodes in a UCS cluster. I installed the replacement unit, updated firmware to match the existing node and configured it to join the cluster. Next step is to reconnect LAN, SAN, and swap the expansion modu