Information on table type datatypes.

Hi,
I am working with the table type composite datatype. After I insert the values to the table type declared variable how will I be able to print that or use it in further DML operations.
example
create or replace procedure xxx_proc as
type u_rec is record
empno number(5),
ename varchar2(10));
type m_tbl is table of u_rec index by binary_integer;
cursor c1 is select empno, ename from scott.emp;
nokia m_tbl;
motorola u_rec;
i number:=0;
begin
for j in c1 loop
fetch c1 into motorola;
i := i+1;
nokia(i) := motorola;
end loop;
dbms_output.put_line(nokia.first);
dbms_output.put_line(nokia.last);
dbms_output.put_line(nokia(2));
end;
I execute this proecedure it returns error at 19, how will I print the values.
Regards
Jhansi.

You are driving me crazy
y.empno(i) := i;This should be...
y(i).empno := i;
SQL> declare
  2     type xx is table of emp%rowtype index by binary_integer;
  3     y xx;
  4     i number :=0;
  5  begin
  6     for j in 1..20 loop
  7             i := i+j;
  8             y(i).empno := i;
  9             y(i).ename := 'Mark';
10             y(i).job := 'Clerk';
11             y(i).mgr := i+5;
12             y(i).hiredate := sysdate;
13             y(i).sal := i* 100;
14             y(i).comm := i*10;
15             y(i).deptno := 10;
16     end loop;
17
18     dbms_output.put_line('20 records inserted successfully');
19  end;
20  /
20 records inserted successfully
PL/SQL procedure successfully completed.It works but i have no clue what in the world are you trying to do ;)
Edited by: Karthick_Arp on Feb 18, 2009 9:19 PM

Similar Messages

  • Information about Table Type

    Hi Guys,
    What does Table Type mean?
    What are uses of Table Type?
    Regards,
    Chandru

    Hi
    Analogous to the predefined ABAP types such as C or I , one may define user-defined types in the dictionary.
    The following user-defined types are allowed
    Data elements: Describe an elementary type by defining   the data type, length and possibly decimal places.
    Structures: Consist of components that can have any       type.
    Table types: Describe the structure of an internal table.
    Elaboration on the type categories.
    There are three different type categories in the ABAP Dictionary:
    Data elements (elementary types) Elementary types have no structure. They describe the data type attributes (such as given Dictionary data type, number of places) and information that is relevant for the screen (such as title) of unstructured data objects (variables/fields).
    Structures (structured types) Structured types describe the structure and functions of any structured data objects, that is of data structures with components of any type. A component can be a field with an elementary type or can itself be a structure. A table can also be used as a component in a structure. A database table always has a structure and is therefore implicitly a structured type. However, the fields of a database table can only have an elementary type.
    Table types Table types describe the structure and functions of internal tables in the ABAP program. Their rows can have any row type. Table types with elementary row type therefore can be defined just the same as multi-dimensional table types (table types with a table type as row type) or table types using structures with table-like components.
    Any complex user-defined type may be built using the
    previously mentioned basic types.

  • Help needed on table type datatype.

    Hi,
    I have written the following code,
    declare
    type t is table of emp.empno%type index by binary_integer;
    y t;
    begin
    select empno bulk collect into y
    from emp where 1 = 1;
    dbms_output.put_line(y.count);
    exception
    when others then
    dbms_output.put_line(SQLERRM);
    end;
    now i want to print the values from the table type variable y. how can i do that.
    Regards
    Jhansi

    You reference record elements using dot notation: record.field
    You reference collection elements using parenthesis notation: collection(element)
    So you example might work like this:
    declare
      type t is table of emp.empno%type index by binary_integer;
      y t;
    begin
      select empno bulk collect into y
      from emp where 1 = 1;
      dbms_output.put_line('count='||y.count);
      dbms_output.put_line('Empno in element 1 is '||y(1));
    end; a couple of additional comments
    When you post code, you can enclose it with the markup tag { code } but without the space between the curly brackets and the key word code
    These tags will format everything between them usign a fixed pitch font making it more readable.
    try not to use an EXCEPTION WHEN OTHERS
    usually, you don't want to trap and handle ANY exception.
    If there is a specific exception that you want to trap and handle in your code put that handler in your code, otherwise let and exception propagate up to your SQLPlus or SQLDeveloper calling program.

  • Passing parameters to PL/SQL table types

    Hi Everybody,
    I have one question about passing PL/SQL tables types and tabs as IN parameter in procedure.I am working in 11.2.0.2.0 environment. I am stuck on how to pass those values to procedure.Please find below more details:
    Table 1:
    CREATE TABLE ITEMS
    ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
    ITEM_NAME VARCHAR2(40 BYTE),
    SERIAL NUMBER(2),
    ADDED_ON DATE);
    Table 2:
    CREATE TABLE ITEM_ACTIVITY_INFO
    ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
    ACCOUNT_TYPE VARCHAR2(1 BYTE),
    ID_NUMBER NUMBER(3),
    ACTIVATION_DATE DATE);
    Table 3:
    CREATE TABLE ITEM_GROUP
    GROUP_ID NUMBER(2) NOT NULL,
    ITEM_ID VARCHAR2(40 BYTE),
    GROUP_TYPE VARCHAR2(20 BYTE),
    GROUP_DATE DATE);
    Table 4:
    CREATE TABLE ITEM_ADDRESS
    GROUP_ID NUMBER(2) NOT NULL,
    NAME VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(100));
    Following types are created:
    CREATE OR REPLACE TYPE ITEMS_TYPE AS OBJECT
    ITEM_ID VARCHAR2(40 BYTE),
    ITEM_NAME VARCHAR2(40 BYTE),
    SERIAL NUMBER(2),
    ADDED_ON DATE);
    CREATE OR REPLACE TYPE ITEM_ACTIVITY_TYPE AS OBJECT
    ITEM_ID VARCHAR2(40 BYTE),
    ACCOUNT_TYPE VARCHAR2(1 BYTE),
    ID_NUMBER NUMBER(3),
    ACTIVATION_DATE DATE);
    CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TYPE AS OBJECT
    GROUP_ID NUMBER(2) NOT NULL,
    ITEM_ID VARCHAR2(40 BYTE),
    GROUP_TYPE VARCHAR2(20 BYTE),
    GROUP_DATE DATE
    ITEM_ADDRESS_IN ITEM_ADDRESS_TYPE);
    CREATE OR REPLACE TYPE ITEM_ADDRESS_TYPE AS OBJECT
    GROUP_ID NUMBER(2),
    NAME VARCHAR2(60 BYTE),
    ADDRESS VARCHAR2(100));
    CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TAB AS TABLE OF ITEM_GROUP_COMP_TYPE;
    Create or replace procedure ITEM_ADD_CHANGE(
    ITEM_IN IN ITEMS_TYPE,
    ITEM_ACTIVITY_IN IN ITEM_ACTIVITY_TYPE,
    ITEM_GROUP_IN IN ITEM_GROUP_COMP_TAB,
    ITEM_OUT IN OUT ITEMS.ITEM_ID%TYPE);
    Above are the paramteres we are passing to procedure.
    I need help in how to pass parameters to above procedure. All comments and responses will be highly appreciated. Thanks everyone for going through the post. Please let me know if more more information is required on this problem.
    Regards
    Dev

    Billy  Verreynne  wrote:
    Types used in this fashion, only make sense if the table is based on the type. It makes very little sense to have a table structure and then to duplicate the structure using a type.
    The 2 structures may be defined the same. But they are NOT interchangeable and requires one to be converted to the other to use. This is not sensible in my view. It is far easier in that case to simply use the PL/SQL macro +%RowType+ to create a duplicate structure definition - one that can natively be used for touching that table, without conversions required.
    If you do want to use types, define the type, then define the table of that type, adding the required constraints (pk, fk, not null, check) to the table's definition.Billy:
    Just curious, why do you say it makes very little sense to have a type modeled on a table? I do that a lot. In my case, I am getting the values from an external program, not building them manually, but it makes a lot of sense to me.
    One application where I do this a lot has a java front-end that parses HL7 messages. Each message contains at least minimal information about a variable number of entities (and often several rows for an entity) in the database, and must be processed as a single atomic trasnaction. So, rather than have potentially hundreds of parameters to the "main" driver procedures for different message types I created a set of types more or less identical to the tables representing the entities. The java program parses the mesasge and populates the type, then calls the appropriate stored procedure for the message type passing in the populated types. My stored procedure then does inserts/updates or deletes as appropriate over potentially dozens of tables.
    John

  • User defined table types sometimes show up a unknown data type in Profiler

    A couple of our users have a problem when using user defined table types. Calls are made using UDTT as variables and these are then passed to a stored procedure as parameters. Sometimes the application returns a timeout. In such situations a Profiler-Trace
    shows the following:
    declare @p4 unknown
    whereas the correct trace (that is sometimes displayed) should be:
    declare @p4 dbo.ReportFilterTableType
    ReportFilterTableType is a UDTT. The users do have correct permissions for the UDTT (otherwise they would never be usable for the user). What could be the reason that the data types for the variable
    @p4 in the example are sometimes returned as unknown and at other times are returned correctly as
    ReportFilterTableType? Could this possibly be a network related issue?
    Thank you.
    Graham Goodwin Email: [email protected]

    I know this is a old post, but i am also facing the same issue that too in my production server. Did you find any workarround for this issue. Please do reply. Critical problem we are facing.
    Alka, Is your problem timeouts when passing TVP parameters, or is it that a Profiler Trace shows type "unknown" for the TVP data type name?
    If your problem is timeouts, be aware that TVPs do not have statistics so the optimizer might not be able to generate an optimal plan for non-trivial queries. Declaring a primary key or unique constraint on the table type may help since that will provide
    useful cardinality information.  You may need to resort to hints in some cases.
    I suggest you start a new thread with details of your specific situation if the information in this thread doesn't help.
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • PL/SQL table type in Forms 4.5

    Hi
    I am trying to use a pl/sql table type variable in Oracle forms 4.5 . I am able to compile this and run it on the database that the application connects to but in forms , it gives me a compilation error.
    Is there some restriction on using this datatype in forms 4.5
    Following is the syntax I am using:
    TYPE block_list_type IS TABLE of VARCHAR2(200) INDEX BY BINARY_INTEGER;
    block_list block_list_type;
    I get fatal syntax error even though the syntax is correct(checked it on the database).
    please let me know if I am doing something wrong.
    thanks a lot

    That explains it!!
    Thanks. My company is on oracle 10.7 and is too reluctant to move to higher versions. They finally bought I2 and are developing their own custom java applications and will phase out 10.7 but are not willing to move to the next version of Oracle !!
    Seems like they are done with Oracle .
    thanks for the input anyways.

  • Calling Oracle Stored proc with record type and table Type

    I have a oracle SP which takes record type and table Type which are used for order management.
    Is there anay way to populate parameters with these datatypes and call the stored procedure using ODP.NET?
    Please help.
    Thanks in advance

    Hi,
    ODP supports associative arrays and REF Cursors. There is no support for PLSQL table of records.
    Jenny

  • Java call stored procedure with nested table type parameter?

    Hi experts!
    I need to call stored procedure that contains nested table type parameter, but I don't know how to handle it.
    The following is my pl/sql code:
    create or replace package test_package as
    type row_abc is record(
    col1 varchar2(16),
    col2 varchar2(16),
    col3 varchar2(16 )
    type matrix_abc is table of row_abc index by binary_integer;
    PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
    p_arg2 IN VARCHAR2,
    p_arg3 IN VARCHAR2,
    p_out OUT matrix_abc
    END test_package;
    create or replace package body test_package as
    PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
    p_arg2 IN VARCHAR2,
    p_arg3 IN VARCHAR2,
    p_out OUT matrix_abc
    IS
    v_sn NUMBER(8):=0 ;
    BEGIN
    LOOP
    EXIT WHEN v_sn>5 ;
    v_sn := v_sn + 1;
    p_out(v_sn).col1 := 'col1_'||to_char(v_sn)|| p_arg1 ;
    p_out(v_sn).col2 := 'col2_'||to_char(v_sn)||p_arg2 ;
    p_out(v_sn).col3 := 'col3_'||to_char(v_sn)||p_arg3 ;
    END LOOP ;
    END ;
    END test_package ;
    My java code is following, it doesn't work:
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    Connection con = DriverManager.getConnection
    ("jdbc:oracle:thin:@10.16.102.176:1540:dev", "scott", "tiger");
    con.setAutoCommit(false);
    CallableStatement ps = null;
    String sql = " begin test_package.test_matrix( ?, ? , ? , ? ); end ; ";
    ps = con.prepareCall(sql);
    ps.setString(1,"p1");
    ps.setString(2,"p2");
    ps.setString(3,"p3");
    ps.registerOutParameter(4,OracleTypes.CURSOR);
    ps.execute();
    ResultSet rset = (ResultSet) ps.getObject(1);
    error message :
    PLS-00306: wrong number or types of arguments in call to 'TEST_MATRIX'
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    Regards
    Louis

    Louis,
    If I'm not mistaken, record types are not allowed. However, you can use object types instead. However, they must be database types. In other words, something like:
    create or replace type ROW_ABC as object (
    col1 varchar2(16),
    col2 varchar2(16),
    col3 varchar2(16 )
    create or replace type MATRIX_ABC as table of ROW_ABC
    /Then you can use the "ARRAY" and "STRUCT" (SQL) types in your java code. If I remember correctly, I recently answered a similar question either in this forum, or at JavaRanch -- but I'm too lazy to look for it now. Do a search for the terms "ARRAY" and "STRUCT".
    For your information, there are also code samples of how to do this on the OTN Web site.
    Good Luck,
    Avi.

  • Table types and internal table

    Hi all,
    What is the relationship between table type in ABAP dictionary and internal table?
    Moderator message : Search for available information OR read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jul 16, 2011 11:16 AM

    You can INCLUDE TYPE.
    Types: begin of itab,
           field1 type string,
           field2 type string,
    *      More Fields in here.
           Field30 type string,
           End of itab.
    Data: lt_itab type table of itab.
    TYPES BEGIN OF new_itab.
           INCLUDE type itab.
    TYPES: field31 type string,
           field32 type string,
    END OF new_itab.
    Regards,
    Rich Heilman

  • Oracle Object Table Type

    I have an application that I would like to map bc4j to a object type hierarchy in the database. From reading previous otn threads I'm under the impression that Domains are not used for Oracle Table Types, just for columns based on oracle types. The thread later goes on to say that for the base type (person_typ) I would map a entity object to the table(person_table) mapped to the base type. To map all the sub-types I would create new entity objects and have PersonEO subclassed into StudentEO and EmployeeEO.
    I have done this and it's unclear to me when I subclass PersonEO as StudentEO how do I declare that StudentEO is of oracle object type student_typ?
    I'm also having problems with inserting data into the base entity obect. Here's code:
    PersonVOImpl personVo = am.getPersonVO();
    PersonVORowImpl row = (PersonVORowImpl)personVo.createRow();
    personVo.insertRow(row);
    row.setName("Mark");
    row.setPhone("911");
    am.getTransaction().commit();
    personVo.executeQuery();
    while (personVo.hasNext()){
    PersonVORowImpl personRow = (PersonVORowImpl)personVo.next();
    The data gets comitted to the db correctly but when the code hits personVo.executeQuery() I get the following error:
    oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.sql.STRUCT with value:Mark
         at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:687)
         at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:80)
         at oracle.jbo.server.OracleSQLBuilderImpl.doLoadBulkFromResultSet(OracleSQLBuilderImpl.java:1113)
         at oracle.jbo.server.ViewRowImpl.populate(ViewRowImpl.java:2017)
         at oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(ViewDefImpl.java:1013)
         at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:2309)
         at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:2240)
         at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:1698)
         at oracle.jbo.server.QueryCollection.fetch(QueryCollection.java:1552)
         at oracle.jbo.server.QueryCollection.get(QueryCollection.java:1008)
         at oracle.jbo.server.ViewRowSetImpl.getRow(ViewRowSetImpl.java:2791)
         at oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(ViewRowSetIteratorImpl.java:2504)
         at oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed(ViewRowSetIteratorImpl.java:2368)
         at oracle.jbo.server.ViewRowSetIteratorImpl.refresh(ViewRowSetIteratorImpl.java:2569)
         at oracle.jbo.server.ViewRowSetImpl.notifyRefresh(ViewRowSetImpl.java:1641)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:577)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:611)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:593)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:2886)
         at model.testing.main(testing.java:33)
    Am I coding this correctly? I'm using jdev9032 for this. Are there any examples out there on how to correctly use bc4j with oracle object type tables?
    Thanks in advance!
    -Mark

    Here is my ddl:
    CREATE TYPE Person_typ AS OBJECT
    ( name VARCHAR2(30),
    address VARCHAR2(100)) NOT FINAL
    CREATE TABLE PERSON_TABLE OF PERSON_TYP
    I map a entity object to person_table one for one and I edit the SYS_NC_OID$ property of updateable to never.
    I then map a view object one for one to the entity object. The jbo trace I get when -Djbo.debugoutput=console is declared is the following (omitted everything before the db connected).[156] Successfully logged in
    [157] JDBCDriverVersion: 9.0.1.4.0
    [158] DatabaseProductName: Oracle
    [159] DatabaseProductVersion: Personal Oracle9i Release 9.2.0.1.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.1.0 - Production
    [160] ViewRowSetImpl's jbo.viewlink.consistent = false (0)
    [161] Column count: 3
    [162] Executing SQL in generateRefAndOID...
    [163] select a.oid, make_ref(PERSON_TABLE, a.oid) from (select /*+ NO_MERGE +*/ sys_op_guid() as oid from dual) a
    [164] OracleSQLBuilder Executing DML on: PERSON_TABLE (Insert)
    [165] INSERT INTO PERSON_TABLE(NAME,ADDRESS) VALUES (:1,:2)
    [166] BaseSQLBuilder: releaseSavepoint 'BO_SP' ignored
    [167] PersonVO notify COMMIT ...
    [168] Column count: 3
    [169] ViewObject : Created new QUERY statement
    [170] SELECT REF(PersonTable), PersonTable.NAME, PersonTable.ADDRESS FROM PERSON_TABLE PersonTable
    [171] LoadBulkFromResultSet failed (2)
    oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:oracle.sql.STRUCT with value:Mark
         java.lang.Object oracle.jbo.domain.TypeFactory.get(java.lang.Class, java.lang.Class, java.lang.Object)
              TypeFactory.java:687
         java.lang.Object oracle.jbo.domain.TypeFactory.getInstance(java.lang.Class, java.lang.Object)
              TypeFactory.java:80
         java.lang.Object[] oracle.jbo.server.OracleSQLBuilderImpl.doLoadBulkFromResultSet(oracle.jbo.server.AttributeDefImpl[], int, java.sql.ResultSet, int, oracle.jbo.server.DBTransactionImpl)
              OracleSQLBuilderImpl.java:1059
         void oracle.jbo.server.ViewRowImpl.populate(java.sql.ResultSet)
              ViewRowImpl.java:1964
         oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewDefImpl.createInstanceFromResultSet(oracle.jbo.server.ViewObjectImpl, oracle.jbo.server.QueryCollection, java.sql.ResultSet)
              ViewDefImpl.java:1019
         oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(java.lang.Object, java.sql.ResultSet)
              ViewObjectImpl.java:2035
         oracle.jbo.server.ViewRowImpl oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(oracle.jbo.server.QueryCollection, java.sql.ResultSet)
              ViewObjectImpl.java:1966
         oracle.jbo.server.ViewRowImpl oracle.jbo.server.QueryCollection.populateRow()
              QueryCollection.java:1395
         boolean oracle.jbo.server.QueryCollection.fetch(int)
              QueryCollection.java:1237
         java.lang.Object oracle.jbo.server.QueryCollection.get(int)
              QueryCollection.java:832
         oracle.jbo.Row oracle.jbo.server.ViewRowSetImpl.getRow(int)
              ViewRowSetImpl.java:2621
         void oracle.jbo.server.ViewRowSetIteratorImpl.doFetch(int)
              ViewRowSetIteratorImpl.java:2347
         void oracle.jbo.server.ViewRowSetIteratorImpl.ensureRefreshed()
              ViewRowSetIteratorImpl.java:2211
         void oracle.jbo.server.ViewRowSetIteratorImpl.refresh(boolean, boolean)
              ViewRowSetIteratorImpl.java:2412
         void oracle.jbo.server.ViewRowSetImpl.notifyRefresh(boolean, boolean)
              ViewRowSetImpl.java:1556
         void oracle.jbo.server.ViewRowSetImpl.execute(boolean, boolean)
              ViewRowSetImpl.java:548
         void oracle.jbo.server.ViewRowSetImpl.executeQuery()
              ViewRowSetImpl.java:564
         void oracle.jbo.server.ViewObjectImpl.executeQuery()
              ViewObjectImpl.java:2616
         void mypackage1.testing.main(java.lang.String[])
              testing.java:25
    Exception in thread main
    Process exited with exit code 1.
    Please let me know if you need more information.
    -Mark

  • Managing statistics for object collections used as table types in SQL

    Hi All,
    Is there a way to manage statistics for collections used as table types in SQL.
    Below is my test case
    Oracle Version :
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    SQL> Original Query :
    SELECT
         9999,
         tbl_typ.FILE_ID,
         tf.FILE_NM ,
         tf.MIME_TYPE ,
         dbms_lob.getlength(tfd.FILE_DATA)
    FROM
         TG_FILE tf,
         TG_FILE_DATA tfd,
              SELECT
              FROM
                   TABLE
                        SELECT
                             CAST(TABLE_ESC_ATTACH(OBJ_ESC_ATTACH( 9999, 99991, 'file1.png', NULL, NULL, NULL),
                             OBJ_ESC_ATTACH( 9999, 99992, 'file2.png', NULL, NULL, NULL)) AS TABLE_ESC_ATTACH)
                        FROM
                             dual
         )     tbl_typ
    WHERE
         tf.FILE_ID     = tfd.FILE_ID
    AND tf.FILE_ID  = tbl_typ.FILE_ID
    AND tfd.FILE_ID = tbl_typ.FILE_ID;
    Elapsed: 00:00:02.90
    Execution Plan
    Plan hash value: 3970072279
    | Id  | Operation                                | Name         | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                         |              |     1 |   194 |  4567   (2)| 00:00:55 |
    |*  1 |  HASH JOIN                               |              |     1 |   194 |  4567   (2)| 00:00:55 |
    |*  2 |   HASH JOIN                              |              |  8168 |   287K|   695   (3)| 00:00:09 |
    |   3 |    VIEW                                  |              |  8168 |   103K|    29   (0)| 00:00:01 |
    |   4 |     COLLECTION ITERATOR CONSTRUCTOR FETCH|              |  8168 | 16336 |    29   (0)| 00:00:01 |
    |   5 |      FAST DUAL                           |              |     1 |       |     2   (0)| 00:00:01 |
    |   6 |    TABLE ACCESS FULL                     | TG_FILE      |   565K|    12M|   659   (2)| 00:00:08 |
    |   7 |   TABLE ACCESS FULL                      | TG_FILE_DATA |   852K|   128M|  3863   (1)| 00:00:47 |
    Predicate Information (identified by operation id):
       1 - access("TF"."FILE_ID"="TFD"."FILE_ID" AND "TFD"."FILE_ID"="TBL_TYP"."FILE_ID")
       2 - access("TF"."FILE_ID"="TBL_TYP"."FILE_ID")
    Statistics
              7  recursive calls
              0  db block gets
          16783  consistent gets
          16779  physical reads
              0  redo size
            916  bytes sent via SQL*Net to client
            524  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              2  rows processed Indexes are present in both the tables ( TG_FILE, TG_FILE_DATA ) on column FILE_ID.
    select
         index_name,blevel,leaf_blocks,DISTINCT_KEYS,clustering_factor,num_rows,sample_size
    from
         all_indexes
    where table_name in ('TG_FILE','TG_FILE_DATA');
    INDEX_NAME                     BLEVEL LEAF_BLOCKS DISTINCT_KEYS CLUSTERING_FACTOR     NUM_ROWS SAMPLE_SIZE
    TG_FILE_PK                          2        2160        552842             21401       552842      285428
    TG_FILE_DATA_PK                     2        3544        852297             61437       852297      852297 Ideally the view should have used NESTED LOOP, to use the indexes since the no. of rows coming from object collection is only 2.
    But it is taking default as 8168, leading to HASH join between the tables..leading to FULL TABLE access.
    So my question is, is there any way by which I can change the statistics while using collections in SQL ?
    I can use hints to use indexes but planning to avoid it as of now. Currently the time shown in explain plan is not accurate
    Modified query with hints :
    SELECT    
        /*+ index(tf TG_FILE_PK ) index(tfd TG_FILE_DATA_PK) */
        9999,
        tbl_typ.FILE_ID,
        tf.FILE_NM ,
        tf.MIME_TYPE ,
        dbms_lob.getlength(tfd.FILE_DATA)
    FROM
        TG_FILE tf,
        TG_FILE_DATA tfd,
            SELECT
            FROM
                TABLE
                        SELECT
                             CAST(TABLE_ESC_ATTACH(OBJ_ESC_ATTACH( 9999, 99991, 'file1.png', NULL, NULL, NULL),
                             OBJ_ESC_ATTACH( 9999, 99992, 'file2.png', NULL, NULL, NULL)) AS TABLE_ESC_ATTACH)
                        FROM
                             dual
        tbl_typ
    WHERE
        tf.FILE_ID     = tfd.FILE_ID
    AND tf.FILE_ID  = tbl_typ.FILE_ID
    AND tfd.FILE_ID = tbl_typ.FILE_ID;
    Elapsed: 00:00:00.01
    Execution Plan
    Plan hash value: 1670128954
    | Id  | Operation                                 | Name            | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                          |                 |     1 |   194 | 29978   (1)| 00:06:00 |
    |   1 |  NESTED LOOPS                             |                 |       |       |            |          |
    |   2 |   NESTED LOOPS                            |                 |     1 |   194 | 29978   (1)| 00:06:00 |
    |   3 |    NESTED LOOPS                           |                 |  8168 |  1363K| 16379   (1)| 00:03:17 |
    |   4 |     VIEW                                  |                 |  8168 |   103K|    29   (0)| 00:00:01 |
    |   5 |      COLLECTION ITERATOR CONSTRUCTOR FETCH|                 |  8168 | 16336 |    29   (0)| 00:00:01 |
    |   6 |       FAST DUAL                           |                 |     1 |       |     2   (0)| 00:00:01 |
    |   7 |     TABLE ACCESS BY INDEX ROWID           | TG_FILE_DATA    |     1 |   158 |     2   (0)| 00:00:01 |
    |*  8 |      INDEX UNIQUE SCAN                    | TG_FILE_DATA_PK |     1 |       |     1   (0)| 00:00:01 |
    |*  9 |    INDEX UNIQUE SCAN                      | TG_FILE_PK      |     1 |       |     1   (0)| 00:00:01 |
    |  10 |   TABLE ACCESS BY INDEX ROWID             | TG_FILE         |     1 |    23 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       8 - access("TFD"."FILE_ID"="TBL_TYP"."FILE_ID")
       9 - access("TF"."FILE_ID"="TBL_TYP"."FILE_ID")
           filter("TF"."FILE_ID"="TFD"."FILE_ID")
    Statistics
              0  recursive calls
              0  db block gets
             16  consistent gets
              8  physical reads
              0  redo size
            916  bytes sent via SQL*Net to client
            524  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              2  rows processed
    Thanks,
    B

    Thanks Tubby,
    While searching I had found out that we can use CARDINALITY hint to set statistics for TABLE funtion.
    But I preferred not to say, as it is currently undocumented hint. I now think I should have mentioned it while posting for the first time
    http://www.oracle-developer.net/display.php?id=427
    If we go across the document, it has mentioned in total 3 hints to set statistics :
    1) CARDINALITY (Undocumented)
    2) OPT_ESTIMATE ( Undocumented )
    3) DYNAMIC_SAMPLING ( Documented )
    4) Extensible Optimiser
    Tried it out with different hints and it is working as expected.
    i.e. cardinality and opt_estimate are taking the default set value
    But using dynamic_sampling hint provides the most correct estimate of the rows ( which is 2 in this particular case )
    With CARDINALITY hint
    SELECT
        /*+ cardinality( e, 5) */*
    FROM
         TABLE
              SELECT
                   CAST(TABLE_ESC_ATTACH(OBJ_ESC_ATTACH( 9999, 99991, 'file1.png', NULL, NULL, NULL),
                   OBJ_ESC_ATTACH( 9999, 99992, 'file2.png', NULL, NULL, NULL)) AS TABLE_ESC_ATTACH)
              FROM
                   dual
         ) e ;
    Elapsed: 00:00:00.00
    Execution Plan
    Plan hash value: 1467416936
    | Id  | Operation                             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                      |      |     5 |    10 |    29   (0)| 00:00:01 |
    |   1 |  COLLECTION ITERATOR CONSTRUCTOR FETCH|      |     5 |    10 |    29   (0)| 00:00:01 |
    |   2 |   FAST DUAL                           |      |     1 |       |     2   (0)| 00:00:01 |
    With OPT_ESTIMATE hint
    SELECT
         /*+ opt_estimate(table, e, scale_rows=0.0006) */*
    FROM
         TABLE
              SELECT
                   CAST(TABLE_ESC_ATTACH(OBJ_ESC_ATTACH( 9999, 99991, 'file1.png', NULL, NULL, NULL),
                   OBJ_ESC_ATTACH( 9999, 99992, 'file2.png', NULL, NULL, NULL)) AS TABLE_ESC_ATTACH)
              FROM
                   dual
         ) e ;
    Execution Plan
    Plan hash value: 4043204977
    | Id  | Operation                              | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                       |      |     5 |   485 |    29   (0)| 00:00:01 |
    |   1 |  VIEW                                  |      |     5 |   485 |    29   (0)| 00:00:01 |
    |   2 |   COLLECTION ITERATOR CONSTRUCTOR FETCH|      |     5 |    10 |    29   (0)| 00:00:01 |
    |   3 |    FAST DUAL                           |      |     1 |       |     2   (0)| 00:00:01 |
    With DYNAMIC_SAMPLING hint
    SELECT
        /*+ dynamic_sampling( e, 5) */*
    FROM
         TABLE
              SELECT
                   CAST(TABLE_ESC_ATTACH(OBJ_ESC_ATTACH( 9999, 99991, 'file1.png', NULL, NULL, NULL),
                   OBJ_ESC_ATTACH( 9999, 99992, 'file2.png', NULL, NULL, NULL)) AS TABLE_ESC_ATTACH)
              FROM
                   dual
         ) e ;
    Elapsed: 00:00:00.00
    Execution Plan
    Plan hash value: 1467416936
    | Id  | Operation                             | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT                      |      |     2 |     4 |    11   (0)| 00:00:01 |
    |   1 |  COLLECTION ITERATOR CONSTRUCTOR FETCH|      |     2 |     4 |    11   (0)| 00:00:01 |
    |   2 |   FAST DUAL                           |      |     1 |       |     2   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement (level=2)I will be testing the last option "Extensible Optimizer" and put my findings here .
    I hope oracle in future releases, improve the statistics gathering for collections which can be used in DML and not just use the default block size.
    By the way, are you aware why it uses the default block size ? Is it because it is the smallest granular unit which oracle provides ?
    Regards,
    B

  • "table type" result from stored procedure (Oracle 10g) for physical service

    Hello,
    I'm trying to create a physical service based on a stored procedure which returns a table type like this:
    SQL
    -- create table
    create table myTable ( "col1" VARCHAR2(250) not null enable, "filtercol1" VARCHAR2(250), "filtercol2" VARCHAR2(250), "sortcol1" VARCHAR2(250), "sortcol2" VARCHAR2(250), "sortcol3" VARCHAR2(250))
    -- create return type
    create or replace type myResultType as table of varchar2(250);
    -- create function
    create or replace function getResult(param1 in varchar2, param2 in varchar2, orderby in varchar2) return myResultType as
    query_str VARCHAR2(1000);
    myResult myResultType;
    begin
    query_str := 'select m.col1 from myTable m where m.filtercol1 like :param1 and m.filtercol2 like :param2 order by ' || orderby;
    execute immediate query_str bulk collect into myResult using param1, param2;
    return myResult;
    end getResult;
    The wizard for creating the physical service complains that it can't find the return type and I have to create a schema by myself. How should it look like? I can't find a sample in the documentation.
    Thanks for any help,
    Guido

    Ok, now the wizard produces something like this:
    (::pragma function <f:function xmlns:f="urn:annotations.ld.bea.com" visibility="protected" kind="library" isPrimary="false" nativeName="GETRESULT" nativeLevel2Container="MY_SCHEMA" style="storedProcedure">
    <nonCacheable/>
    <params xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:pn1="ld:physical/SQLServices/MY_TMP_TABLE" >
    <param name="RETURN_VALUE" kind="return" xqueryType="pn1:MY_TMP_TABLE" nativeTypeCode="0" nativeType="RowSet"/>
    <param name="RETURN_VALUE" kind="out" xqueryType="pn1:MY_TMP_TABLE" nativeTypeCode="0" nativeType="RowSet"/>
    <param name="PARAM1" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="PARAM2" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    <param name="ORDERBY" kind="in" xqueryType="xs:string" nativeTypeCode="12" nativeType="VARCHAR2"/>
    </params>
    </f:function>::)
    declare procedure f1:GETRESULT($PARAM1 as xs:string, $PARAM2 as xs:string, $ORDERBY as xs:string) as schema-element(t1:GETRESULT) external;
    Then WorkSpace Studio complains about: "... error: cos-element-consistent: Type of 'RETURN_VALUE' is inconsistent with another element with the same name in this content model. "
    If I rename one RETURN_VALUE to RETURN_VALUE1 (the param name and in the schema file) the error is gone, but if I try to test the method I get:
    com.bea.dsp.das.exception.DASException: weblogic.xml.query.exceptions.XQuerySagaException: {bea-err}UPD003: Update failure: mixed outcome, update error dispatched (updateid=SAGA_596ba32b1ff8d8a4:181f0b20:11f92ed2529:-7fe2): java.lang.RuntimeException: Konflikt bei Parametertyp
         at com.bea.dsp.das.ejb.EJBClient.invokeOperation(EJBClient.java:160)
         at com.bea.dsp.das.DataAccessServiceImpl.invokeOperation(DataAccessServiceImpl.java:171)
         at com.bea.dsp.das.DataAccessServiceImpl.invoke(DataAccessServiceImpl.java:122)
         at com.bea.dsp.ide.xquery.views.test.QueryExecutor.invokeFunctionOrProcedure(QueryExecutor.java:121)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.getFunctionExecutionResult(XQueryTestView.java:1006)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.executeFunction(XQueryTestView.java:1134)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedImpl(XQueryTestView.java:1807)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.access$300(XQueryTestView.java:159)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent$3.run(XQueryTestView.java:1535)
         at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedBusy(XQueryTestView.java:1538)
         at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelected(XQueryTestView.java:1500)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1930)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1894)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:422)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:339)
         at org.eclipse.core.launcher.Main.basicRun(Main.java:283)
         at org.eclipse.core.launcher.Main.run(Main.java:984)
         at org.eclipse.core.launcher.Main.eclipse_main(Main.java:959)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.m7.installer.util.NitroxMain$1.run(NitroxMain.java:39)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    "Konflikt bei Parametertyp" means something like: parameter type conflict
    Best regards,
    Guido

  • How to display image that's in a table (BLOB datatype) in  apex 4.0 report

    I have an image that is in a table and I'm trying to get it to display in a report. The upload takes place on 1 page and the report is on another page. The source for the report page is as follows:
    select firstname,
    lastname,
    decode(nvl(dbms_lob.getlength(IMAGE),0),0,null,
    '<img '||
    'src="'||
    apex_util.get_blob_file_src('P1_PHOTO',username)||
    '" height="75" width="75" alt="Product Image" title="Product Image" />')
    detail_img
    from user_image
    P1_PHOTO is the upload item on page 1. My report is on another page. The image is not displayed in the report. Any ideas would be appreciated.

    Hi Charlie69,
    Go the Report Attributes -> BLOB Column -> Number / Date Format. Below this attribute you will find
    the link BLOB Download Format Mask which will open a dialog to fill in following information:
    1) Format Mask: IMAGE
    2) BLOB Table: Name of the table where to find the required BLOB
    3) BLOB Column: Table column name where you stored the actual BLOB
    4) Primary Key Column 1: Primary key of the table where BLOB is stored
    5) Primary Key Column 2:
    6) MIME Type Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    7) Filename Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    8) BLOB Last Updated Column: (Table column name where you stored the required information about BLOB)(Type: DATE)
    9) Character Set Column: (Table column name where you stored the required information about BLOB)(Type: VARCHAR2)
    10) Content Disposition: Inline(If you want to show it in the browser)
    11) Download Link Text: (Not necessary when you want to show image)
    I have set the format mask accordingly and the image is displayed in my report.
    Hope it helps!
    Regards,
    Kiran

  • Best to use in terms of tuning Global Temporary table or PLSQL Table type

    Hi All,
    which one is best to use in terms of tuning Global Temporary table or PLSQL table type?
    Thanks in Advance.
    Regards
    Deepika

    user8828028 wrote:
    which one is best to use in terms of tuning Global Temporary table or PLSQL table type?The answer to which one is better depends on the requirements - and an informed decision as to which one to use to address those requirements.
    Thus it is important to understand how these work. They are nothing alike.
    PL/SQL collections reside in the PGA. Can only be used in SQL via binding. Cannot be indexed. Temp tables on the other hand does not use expensive PGA. Does not need to be bind in SQL. Can be indexed. Etc.
    Sure, a (surgical) saw and scalpel are both used on the operating table - but for very different purposes.

  • Whats the important of "  table-type  " in sap abap?

    hi,
    i am ahmed. abap fresher.
    i want to what use and importance of table-type in sap abap which comes in      
                         datadictionary
                                V               
                        data types
    V----
    V                         V                                 V
    data element       structure                   table type
    i want to know about table type. plz give a brief idea.
    bye.

    hi,
    Transparent Tables
    A transparent table in the dictionary has a one-to-one relationship with a table in the database. Its structure in R/3 Data Dictionary corresponds to a single database table. For each transparent table definition in the dictionary, there is one associated table in the database. The database table has the same name, the same number of fields, and the fields have the same names as the R/3 table definition. When looking at the definition of an R/3 transparent table, it might seem like you are looking at the database table itself.
    Transparent tables are much more common than pooled or cluster tables. They are used to hold application data. Application data is the master data or transaction data used by an application. An example of master data is the table of vendors (called vendor master data), or the table of customers (called customer master data). An example of transaction data is the orders placed by the customers, or the orders sent to the vendors.
    Transparent tables are probably the only type of table you will ever create. Pooled and cluster tables are not usually used to hold application data but instead hold system data, such as system configuration information, or historical and statistical data.
    Both pooled and cluster tables have many-to-one relationships with database tables. Both can appear as many tables in R/3, but they are stored as a single table in the database. The database table has a different name, different number of fields, and different field names than the R/3 table. The difference between the two types lies in the characteristics of the data they hold, and will be explained in the following sections.
    Table Pools and Pooled Tables
    A pooled table in R/3 has a many-to-one relationship with a table in the database (see Figures 3.1 and 3.2). For one table in the database, there are many tables in the R/3 Data Dictionary. The table in the database has a different name than the tables in the DDIC, it has a different number of fields, and the fields have different names as well. Pooled tables are an SAP proprietary construct.
    When you look at a pooled table in R/3, you see a description of a table. However, in the database, it is stored along with other pooled tables in a single table called a table pool. A table pool is a database table with a special structure that enables the data of many R/3 tables to be stored within it. It can only hold pooled tables.
    R/3 uses table pools to hold a large number (tens to thousands) of very small tables (about 10 to 100 rows each). Table pools reduce the amount of database resources needed when many small tables have to be open at the same time. SAP uses them for system data. You might create a table pool if you need to create hundreds of small tables that each hold only a few rows of data. To implement these small tables as pooled tables, you first create the definition of a table pool in R/3 to hold them all. When activated, an associated single table (the table pool) will be created in the database. You can then define pooled tables within R/3 and assign them all to your table pool (see Figure 3.2).
    Pooled tables are primarily used by SAP to hold customizing data.
    When a corporation installs any large system, the system is usually customized in some way to meet the unique needs of the corporation. In R/3, such customization is done via customizing tables. Customizing tables contain codes, field validations, number ranges, and parameters that change the way the R/3 applications behave.
    Some examples of data contained in customizing tables are country codes, region (state or province) codes, reconciliation account numbers, exchange rates, depreciation methods, and pricing conditions. Even screen flows, field validations, and individual field attributes are sometimes table-driven via settings in customizing tables.
    During the initial implementation of the system the data in the customizing tables is set up by a functional analyst. He or she will usually have experience relating to the business area being implemented and extensive training in the configuration of an R/3 system.
    Table Clusters and Cluster Tables
    A cluster table is similar to a pooled table. It has a many-to-one relationship with a table in the database. Many cluster tables are stored in a single table in the database called a table cluster.
    A table cluster is similar to a table pool. It holds many tables within it. The tables it holds are all cluster tables.
    Like pooled tables, cluster tables are another proprietary SAP construct. They are used to hold data from a few (approximately 2 to 10) very large tables. They would be used when these tables have a part of their primary keys in common, and if the data in these tables are all accessed simultaneously. The data is stored logically as shown in Figure 3.3.
    Figure 3.3 : Table clusters store data from several tables based on the primary key fields that they have in common.
    Table clusters contain fewer tables than table pools and, unlike table pools, the primary key of each table within the table cluster begins with the same field or fields. Rows from the cluster tables are combined into a single row in the table cluster. The rows are combined based on the part of the primary key they have in common. Thus, when a row is read from any one of the tables in the cluster, all related rows in all cluster tables are also retrieved, but only a single I/O is needed.
    A cluster is advantageous in the case where data is accessed from multiple tables simultaneously and those tables have at least one of their primary key fields in common. Cluster tables reduce the number of database reads and thereby improve performance.
    For example, as shown in Figure 3.4, the first four primary key fields in cdhdr and cdpos are identical. They become the primary key for the table cluster with the addition of a standard system field pageno to ensure that each row is unique.
    Reward if helpful
    Jagadish

Maybe you are looking for

  • Excise amount entered wrongly during MIGO.

    Dear All ,            Our client captures and posts excise invoice during MIGO .During MIGO the person has to enter BED ,AED ,SED etc. But now while capturing Excise invoice the person didnt enter any % of excise inspite of warning and posted the MIG

  • I'm trying to print out a credit card statement from my iPad, it only prints the first page not 4pages, please help

    I'm trying to print out a credit card statement from my iPad, it only prints the first page not the 4 pages, please help

  • Blackberry 9220 not starting

    I had kept my blackberry 9220 in my hand bag while i was in a lecture. After an hour I wanted to check time but it wasnt working. i removed battery then tried to turn it on but it didn't. I connected it to wall charger but it still isnt starting, eve

  • Multiple hierarchies in one dimesion

    Hi all, I am new in using AWM. I have problem when using two hierarchies in one dimension. This is sample of dimension. A ---+B -----+B1 -------+B2 ---------+B3 ---+C -----+C1 -------+C2 ---------+C3 Dimension is A and it has two hierarchies B and C.

  • Start up issue g42 TPU 54

    whenever i start my laptop ..it start with beep sound few times and flash screen then windows start up...i have checked my RAM and it is ok..I have 3 GB RAM installed and system information also states 3GB RAM..So dont what is the issues..PLEASE HELP