Doubt in subpartitioning of a table

hi gems...good evening..
I have a table which previously had only range partitions.
Now I changed it to range-hash composite partitioning.
There are 6 partition tablespaces namely TS_PART1, TS_PART2.....TS_PART 6.
The default tablespace of the schema is TS_PROD.
The table had following structure previously:
create table ORDER_BOOK
CUST_ID NUMBER(10),
PROFILE_ID NUMBER(10),
PRODUCT_ID NUMBER(10),
SUB_PROFILE_ID VARCHAR2(25),
CASHFLOW_DATE DATE,
EARNINGS NUMBER(24,6),
constraint ORDER_BOOK_PK primary key(CUST_ID,PROFILE_ID,PRODUCT_ID,SUB_PROFILE_ID,CASHFLOW_DATE)
partition by range (CASHFLOW_DATE)
partition ORDER_BOOK_PART1 values less than (TO_DATE('01-01-2003', 'DD-MM-YYYY')) tablespace TS_PART1,
partition ORDER_BOOK_PART2 values less than (TO_DATE('01-01-2006', 'DD-MM-YYYY')) tablespace TS_PART2,
partition ORDER_BOOK_PART3 values less than (TO_DATE('01-01-2009', 'DD-MM-YYYY')) tablespace TS_PART3,
partition ORDER_BOOK_PART4 values less than (TO_DATE('01-01-2012', 'DD-MM-YYYY')) tablespace TS_PART4,
partition ORDER_BOOK_PART5 values less than (TO_DATE('01-01-2015', 'DD-MM-YYYY')) tablespace TS_PART5,
partition ORDER_BOOK_PART6 values less than (TO_DATE('01-01-2018', 'DD-MM-YYYY')) tablespace TS_PART6
create index ORDER_BOOK_IDX on ORDER_BOOK(PRODUCT_ID,CASHFLOW_DATE);
Now I did the following steps to change the previously existing partitions to the new range-hash composite partitions:
begin
dbms_redefinition.can_redef_table
(uname=>'DEMO_TEST',
tname=>'ORDER_BOOK',
options_flag=>DBMS_REDEFINITION.CONS_USE_PK);
end;
create table INTERIM_ORDER_BOOK
CUST_ID NUMBER(10),
PROFILE_ID NUMBER(10),
PRODUCT_ID NUMBER(10),
SUB_PROFILE_ID VARCHAR2(25),
CASHFLOW_DATE DATE,
EARNINGS NUMBER(24,6),
constraint INTERIM_ORDER_BOOK_PK primary key(CUST_ID,PROFILE_ID,PRODUCT_ID,SUB_PROFILE_ID,CASHFLOW_DATE)
partition by range(CASHFLOW_DATE)
subpartition by hash (CUST_ID)
subpartition template
subpartition SP1 tablespace TS_PART1,
subpartition SP2 tablespace TS_PART2,
subpartition SP3 tablespace TS_PART3,
subpartition SP4 tablespace TS_PART4,
subpartition SP5 tablespace TS_PART5,
subpartition SP6 tablespace TS_PART6
(partition P1 values less than (to_date('01-01-2003','DD-MM-YYYY')),
partition P2 values less than (to_date('01-01-2006','DD-MM-YYYY')),
partition P3 values less than (to_date('01-01-2009','DD-MM-YYYY')),
partition P4 values less than (to_date('01-01-2012','DD-MM-YYYY')),
partition P5 values less than (to_date('01-01-2015','DD-MM-YYYY')),
partition P6 values less than (to_date('01-01-2018','DD-MM-YYYY')))
enable row movement;
begin
dbms_redifinition.start_redef_table
(uname=>'DEMO_TEST',
orig_table=>'ORDER_BOOK',
int_table=>'INTERIM_ORDER_BOOK',
options_flag=>DBMS_REDEFINITION.CONS_USE_PK);
end;
begin
dbms_redefinition.finish_redef_table
(uname=>'DEMO_TEST',
orig_table=>'ORDER_BOOK',
int_table=>'INTERIM_ORDER_BOOK');
end;
After that I made the index with LOCAL clause i.e local index.
But the problem is that...initially when there is only range partitioning, then the datas are going to the corresponding partition tablespaces.
But after modifying the table, populating the table results in consumption of space in both partition tablespaces as well as the default tablespace.
I have checked the size of the tablespaces. From that I came to know about this.
The output of the USER_TAB_SUBPARTITIONS is okk...every subpartitions are in the corresponding tablespaces.
But the main partitions (USER_TAB_PARTITION) are in the default tablespace.
please help me....thanks in advance...
Edited by: user12780416 on Apr 13, 2012 7:46 AM

user12780416 wrote:
Thanks sir for your reply...
Yes, by MOVE syntax I can move the partitions in the corresponding tablespaces.
But i am not getting the reason of consumption of both the tablespaces.
The TS_PART1 increased 2MB, TS_PART2 increased 6MB, TS_PART3 increased 2MB, TS_PART4 increased 5MB, TS_PART5 increased 9MB.
and TS_PROD increased (2+6+2+5+9)=24MB
Why is this happening ?
I have read that when we make subpartitions, they main partitions are the logical entity only and the subpartitions are the physical entity.Where have you read this?
As RP rightly pointed out, you can specify a tablespace for each partition (each partition using a different tablespace) and a tablespace for each subpartitions (again, using many if you felt like it).

Similar Messages

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Subpartitioning a partitioned table

    Hi Experts,
    I would like to sub-partition few of the hand picked partitions of a partitioned-table. Is it possible???
    Below is my example partition table:
    drop table part_tab purge;
    create table part_tab (id number, name clob, dt date)
    partition by range (dt) (
    partition p1 values less than (to_date('01-2-2012', 'dd-mm-yyyy')),
    partition p2 values less than (to_date('01-3-2012', 'dd-mm-yyyy')),
    partition p3 values less than (to_date('01-4-2012', 'dd-mm-yyyy')),
    partition p4 values less than (to_date('01-5-2012', 'dd-mm-yyyy')),
    partition p5 values less than (to_date('01-6-2012', 'dd-mm-yyyy')),
    partition p6 values less than (to_date('01-7-2012', 'dd-mm-yyyy')));
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-01-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-02-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-03-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-04-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-05-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    insert into part_tab select level, 'level-' || level, to_date( to_char(mod(level,25) + 1) || '-06-2012', 'dd-mm-yyyy') from dual connect by level < 100;
    commit;
    create index it_g_id on part_tab(id);
    create index it_p_dt on part_tab(dt) local;
    select index_name, status from user_indexes where table_name = 'PART_TAB';
    select partition_name, status from user_ind_partitions where index_name in (select index_name from user_indexes where table_name = 'PART_TAB');Is it possible to sub-partition only partition p4 & p6?
    Thanks for your time.
    - P

    >
    I would like to sub-partition few of the hand picked partitions of a partitioned-table. Is it possible???
    >
    Yes and No - with a (possibly complex) explanation
    No - it is not possible to create a subpartitioned table that does not have at least ONE subpartition for each partition. This wouldn't make sense anyway - if there is no subpartition for data to go to there is no point in having the partition at all so just don't create that partition.
    Yes - it is possible to create custom sub-partitions for your hand-picked partitions. But the other partitions will still have at least one subpartition. If you don't create a subpartition template then Oracle will create a DEFAULT subpartition for them with a system generated name.
    If you do create a subpartition template then it will be used for all partitions for which you do not specify custom subpartitioning.
    Here is sample DDL based on yours
    drop table part_tab1 cascade constraints
    create table part_tab1 (id number, name clob, dt date)
    partition by range (dt)
    subpartition by list(id)
    SUBPARTITION TEMPLATE(
      subpartition TEMP_2_AND_3 values (2, 3),
      subpartition TEMP_DEFAULT values (DEFAULT)
    ( partition p1 values less than (to_date('01-2-2012', 'dd-mm-yyyy')),
    partition p2 values less than (to_date('01-3-2012', 'dd-mm-yyyy')),
    partition p3 values less than (to_date('01-4-2012', 'dd-mm-yyyy')),
    partition p4 values less than (to_date('01-5-2012', 'dd-mm-yyyy'))
      subpartition P4_1_2_3 values (1, 2, 3),
      subpartition P4_4_5_6 values (4, 5, 6),
      subpartition P4_DEFAULT values (DEFAULT)
    partition p5 values less than (to_date('01-6-2012', 'dd-mm-yyyy')),
    partition p6 values less than (to_date('01-7-2012', 'dd-mm-yyyy'))
      subpartition P6_7_8_9 values (7, 8, 9),
      subpartition P6_DEFAULT values (DEFAULT)
    )Note that custom subpartitioning has been specified for partitions p4 and p6 the subpartitioning is different for those two partitions.
    In this example I have also specified DEFAULT subpartitions for P4, P6 and the subpartition template so that all subpartition data has somewhere to go.
    Any data that does not map to one of the partitions will raise an exception. For example
    (INSERT into part_tab1 values (1, 'abc', to_date('07-7-2012', 'dd-mm-yyyy') - 1/24) 
    ORA-14400: inserted partition key does not map to any partitionTo summarize
    1. A subpartitioned table will ALWAYS have at least one subpartition for each partition
    2. You can specify custom subpartitioning for any partition that is predefined (i.e. not for INTERVAL partitions).
    3. The custom subpartitioning can be different for each partition
    4. You can prevent inserting of data into the table by NOT providing a DEFAULT partition (as in your example). Attempts to insert such data will result in an ORA-14400 exception
    5. You can also effectively prevent insertion into a partition by defining a subpartition (custom or DEFAULT) for a data value that will never exist in your data. No point in doing this since if no data can be inserted into the partition why have the partition to begin with?

  • Reg:doubt in dynamic generated internal table

    hi everyone,
                 i generated a internal table dynamically,the output is in fied symbol,i want to create a internal table using the field symbol sturture,how to create that????
    plz tell me how to create a internal table referencing field symbol structure........
    very urgent plz help.........
    thanks in advance....
    regards,
    balaji.s

    Hi ,
           check out   a small part of an alv report which is using dynamic internal table
    data: dy_table type ref to data,
          dy_line type ref to data.
    field-symbols: <dyn_table> type standard table,
                   <dyn_wa> type any,
                   <dyn_line> type any.
        call method cl_alv_table_create=>create_dynamic_table
          exporting
            it_fieldcatalog = ifc
          importing
            ep_table        = dy_table.
        assign dy_table->* to <dyn_table>.
    CREATE A DYNAMIC WORK AREA.
        create data dy_line like line of <dyn_table>.
        sort it_mard by matnr werks.
        loop at it_mard into wa_mard.
          at new matnr.
            assign dy_line->* to <dyn_wa>.
            assign component 'MATNR' of structure <dyn_wa> to <dyn_line>.
            <dyn_line> = wa_mard-matnr.
            read table it_mard2 into wa_mard1 with key matnr = wa_mard-matnr.
            v_amount = wa_mard1-v_total * p_unit.
            call function 'SPELL_AMOUNT'
              exporting
                amount = v_amount
           currency        = 'INR'
      FILLER          = ' '
            language        = sy-langu
          importing
            in_words        = v_price
          exceptions
            not_found       = 1
            too_large       = 2
            others          = 3
            if sy-subrc <> 0.
              message id sy-msgid type sy-msgty number sy-msgno
                      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
            endif.
            assign component 'V_TOTAL' of structure <dyn_wa> to <dyn_line>.
            <dyn_line> = wa_mard1-v_total.
            assign component 'V_PRICE' of structure <dyn_wa> to <dyn_line>.
            <dyn_line> = v_price-word.
          endat.
          concatenate 'STOCK' '-' 'IN' '-' wa_mard-werks into v_new.
          assign component v_new of structure <dyn_wa> to <dyn_line>.
          <dyn_line> = wa_mard-labst.
          at end of matnr.
            append <dyn_wa> to <dyn_table>.
            clear wa_mard.
            clear <dyn_wa>.
            unassign <dyn_line>.
            unassign <dyn_wa>.
          endat.
        endloop.
    rewards points if helpful.

  • Doubt in Multiselection in a table

    Hi All,
    I have a table and have to to multiselection.While doing the multiselection I have to pass the few things for the selected rows to a BAPI which will process and give the output accordingly.
    In an action handler I am writing the following code:
    //*****Trying the multiselection****//
         IOPENITEMS_openElement tableEle = null;
         IPrivateCreateResultIPView.IMultiNodeElement ele = wdContext.nodeMultiNode().createMultiNodeElement();
         for(int i=0;i<wdContext.nodeOPENITEMS_open().size();i++){
              wdComponentAPI.getMessageManager().reportSuccess(" Size is :"+wdContext.nodeOPENITEMS_open().size());
         boolean aa = wdContext.nodeOPENITEMS_open().isMultiSelected(i);
         wdComponentAPI.getMessageManager().reportSuccess("Selected : "+i " : Val "aa);
         if(aa){
         wdComponentAPI.getMessageManager().reportSuccess(" Selected "+i);
         tableEle = (IOPENITEMS_openElement)wdContext.nodeOPENITEMS_open().getElementAt(i);
         ele.setMultiDocno(tableEle.getDOC_NO());
         ele.setMultiItem(tableEle.getITEM());
         ele.setMultiRep(tableEle.getREP_ITEM());
         ele.setMultiSub(tableEle.getSUB_ITEM());
         wdContext.nodeMultiNode().addElement(ele);
         //****Ends here***//
    here multiNode is a local View node that I have taken to collect the records or the data for the selected rows.
    The Exception that i am getting
    com.sap.tc.webdynpro.progmodel.context.ContextException: Node(CreateResultIPView.multiNode): cannot bind or add element, because it is already bound to a node
        at com.sap.tc.webdynpro.progmodel.context.Node.prepareAddElement(Node.java:645)
        at com.sap.tc.webdynpro.progmodel.context.Node.addElement(Node.java:631)
        at com.accenture.pct.rrs.installmentplan.CreateResultIPView.onActionCreateInstallmentPlan(CreateResultIPView.java:462)
        at com.accenture.pct.rrs.installmentplan.wdp.InternalCreateResultIPView.wdInvokeEventHandler(InternalCreateResultIPView.java:1597)
        at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    Kindly give a solution to the problem.I have been struggling for the past one whole day.
    looking forward to you.
    Regards
    DK

    Try this
        int n = wdContext.nodeOPENITEMS_open().size();
        wdComponentAPI.getMessageManager().reportSuccess("Size of node OPENITEMS_open: " + n);
        for (int i = 0; i < n; i++)
          boolean selected = wdContext.nodeOPENITEMS_open().isMultiSelected(i) || wdContext.nodeOPENITEMS_open().getLeadSelection() == i;
          if (selected)
            wdComponentAPI.getMessageManager().reportSuccess("Element at index " + i + " is selected");
            IOPENITEMS_openElement src = wdContext.nodeOPENITEMS_open().getOPENITEMS_openElementAt(i);
            IMultiNodeElement tgt = wdContext.nodeMultiNode().createMultiNodeElement();
            wdContext.nodeMultiNode().addElement(tgt);
            tgt.setMultiDocno(src.getDOC_NO());
            tgt.setMultiItem(src.getITEM());
            tgt.setMultiRep(src.getREP_ITEM());
            tgt.setMultiSub(src.getSUB_ITEM());
    Armin

  • Doubt on cluster and pooled tables

    Dear experts
    i kno how to create a cluster and pooled table ..
    but in reality how a requirement comes to create a cluster or pooled table....
    plz kindly explain in detailed  
    thanks in advace
    somesh

    Hello,
    Hope the below link gives you an insight into how the pooled/cluster tables behave.
    http://help.sap.com/saphelp_46c/helpdata/EN/81/415d363640933fe10000009b38f839/frameset.htm
    For better understanding on how and when to create pooled/cluster table, refer to the below examples.
    All Condition tables i.e., Annn tables (pricing/discounts etc.,) belong to the table Pool KAPOL (Condition Pool) as the underlying concept is same across different condition tables, but, they have different Key (primary) fields.
    Accounting Document Segment (Line Item records) BSEG is a cluster table that belongs to the table cluster RFBLG. Also, other tables such as BSEC, BSED, BSES, BSET also come under the same table cluster as all of them possess the common Key i.e., BUKRS/BELNR/GJAHR.
    Please contact for further details. <removed_by_moderator>
    With Regards
    Vijay Gajavalli
    Edited by: Julius Bussche on Sep 4, 2008 8:40 AM

  • Moving Subpartitions to a duplicate table in a different schema.

    +NOTE: I asked this question on the PL/SQL and SQL forum, but have moved it here as I think it's more appropriate to this forum. I've placed a pointer to this post on the original post.+
    Hello Ladies and Gentlemen.
    We're currently involved in an exercise at my workplace where we are in the process of attempting to logically organise our data by global region. For information, our production database is currently at version 10.2.0.3 and will shortly be upgraded to 10.2.0.5.
    At the moment, all our data 'lives' in the same schema. We are in the process of producing a proof of concept to migrate this data to identically structured (and named) tables in separate database schemas; each schema to represent a global region.
    In our current schema, our data is range-partitioned on date, and then list-partitioned on a column named OFFICE. I want to move the OFFICE subpartitions from one schema into an identically named and structured table in a new schema. The tablespace will remain the same for both identically-named tables across both schemas.
    Do any of you have an opinion on the best way to do this? Ideally in the new schema, I'd like to create each new table as an empty table with the appropriate range and list partitions defined. I have been doing some testing in our development environment with the EXCHANGE PARTITION statement, but this requires the destination table to be non-partitioned.
    I just wondered if, for partition migration across schemas with the table name and tablespace remaining constant, there is an official "best practice" method of accomplishing such a subpartition move neatly, quickly and elegantly?
    Any helpful replies welcome.
    Cheers.
    James

    You CAN exchange a subpartition into another table using a "temporary" (staging) table as an intermediary.
    See :
    SQL> drop table part_subpart purge;
    Table dropped.
    SQL> drop table NEW_part_subpart purge;
    Table dropped.
    SQL> drop table STG_part_subpart purge;
    Table dropped.
    SQL>
    SQL> create table part_subpart(col_1  number not null, col_2 varchar2(30))
      2  partition by range (col_1) subpartition by list (col_2)
      3  (
      4  partition p_1 values less than (10) (subpartition p_1_s_1 values ('A'), subpartition p_1_s_2 values ('B'), subpartition p_1_s_3 values ('C'))
      5  ,
      6  partition p_2 values less than (20) (subpartition p_2_s_1 values ('A'), subpartition p_2_s_2 values ('B'), subpartition p_2_s_3 values ('C'))
      7  )
      8  /
    Table created.
    SQL>
    SQL> create index part_subpart_ndx on part_subpart(col_1) local;
    Index created.
    SQL>
    SQL>
    SQL> insert into part_subpart values (1,'A');
    1 row created.
    SQL> insert into part_subpart values (2,'A');
    1 row created.
    SQL> insert into part_subpart values (2,'B');
    1 row created.
    SQL> insert into part_subpart values (2,'B');
    1 row created.
    SQL> insert into part_subpart values (2,'C');
    1 row created.
    SQL> insert into part_subpart values (11,'A');
    1 row created.
    SQL> insert into part_subpart values (11,'C');
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> create table NEW_part_subpart(col_1  number not null, col_2 varchar2(30))
      2  partition by range (col_1) subpartition by list (col_2)
      3  (
      4  partition n_p_1 values less than (10) (subpartition n_p_1_s_1 values ('A'), subpartition n_p_1_s_2 values ('B'), subpartition n_p_1_s_3 values ('C'))
      5  ,
      6  partition n_p_2 values less than (20) (subpartition n_p_2_s_1 values ('A'), subpartition n_p_2_s_2 values ('B'), subpartition n_p_2_s_3 values ('C'))
      7  )
      8  /
    Table created.
    SQL>
    SQL> create table STG_part_subpart(col_1  number not null, col_2 varchar2(30))
      2  /
    Table created.
    SQL>
    SQL> -- ensure that the Staging table is empty
    SQL> truncate table STG_part_subpart;
    Table truncated.
    SQL> -- exchanging a subpart out of part_subpart
    SQL> alter table part_subpart exchange subpartition
      2  p_2_s_1 with table STG_part_subpart;
    Table altered.
    SQL> -- exchanging the subpart into NEW_part_subpart
    SQL> alter table NEW_part_subpart exchange subpartition
      2  n_p_2_s_1 with table STG_part_subpart;
    Table altered.
    SQL>
    SQL>
    SQL> select * from NEW_part_subpart subpartition (n_p_2_s_1);
         COL_1 COL_2
            11 A
    SQL>
    SQL> select * from part_subpart subpartition (p_2_s_1);
    no rows selected
    SQL>I have exchanged subpartition p_2_s_1 out of the table part_subpart into the table NEW_part_subpart -- even with a different name for the subpartition (n_p_2_s_1) if so desired.
    NOTE : Since your source and target tables are in different schemas, you will have to move (or copy) the staging table STG_part_subpart from the first schema to the second schema after the first "exchange subpartition" is done. You will have to do this for every subpartition to be exchanged.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Apr 4, 2011 10:19 AM
    Added clarification for cross-schema exchange.

  • Subpartitioning on index organized table in Oracle 10g

    We have an indexorganized table with primary key on 3 columns one of which is a DATE column. We need to partition the table on the DATE column month wise and subpartition it further week wise.
    Please let me know if it is possible and if yes, how?

    Composite Partitioning
    Composite partitioning partitions data using the range method, and within each
    partition, subpartitions it using the hash method. Composite partitions are ideal
    for both historical data and striping. Composite Partitioning also provides
    improved manageability of range partitioning and data placement, as well as the
    parallelism advantages of hash partitioning.
    When creating composite partitions, you specify the following:
    Partitioning method: range
    Partitioning column(s)
    Partition descriptions identifying partition bounds
    Subpartitioning method: hash
    Subpartitioning column(s)
    Number of subpartitions per partition or descriptions of subpartition
    Example:
    CREATE TABLE scubagear (equipno NUMBER, equipname VARCHAR(32), price NUMBER)
    PARTITION BY RANGE (equipno) SUBPARTITION BY HASH(equipname)
    SUBPARTITIONS 8 STORE IN (ts1, ts3, ts5, ts7)
    (PARTITION p1 VALUES LESS THAN (1000),
    PARTITION p2 VALUES LESS THAN (2000),
    PARTITION p3 VALUES LESS THAN (MAXVALUE));
    Each subpartition of a composite-partitioned table is stored in its own segment.
    The partitions of a composite-partitioned table are logical structures only as
    their data is stored in the segments of their subpartitions. As with partitions,
    these subpartitions share the same logical attributes. Unlike range partitions
    in a range partitioned table, the subpartitions cannot have different physical
    attributes from the owning partition except for the Tablespace attribute.
    Composite Partitions Indexes
    Composite partitioning method supports both Local and global indexes.
    The following statement creates a local index on the EMP table where the index
    segments will be spread across tablespaces TS7, TS8, and TS9.
    CREATE INDEX emp_ix ON emp(deptno)
    LOCAL STORE IN (ts7, ts8, ts9);
    This local index will be equipartitioned with the base table as follows:
    It will consist of as many partitions as the base partitioned table.
    Each index partition will consist of as many subpartitions as the corresponding
    base table partition.
    Index entries for rows in a given subpartition of the base table will be stored
    in the corresponding subpartition of the index.
    Refer METALINK doc Note:125314.1

  • EXCHANGE SUBPARTITION between two Partitioned tables

    DB Version: 10.2.0.5
    We have :
    Table A(Range-List Partitioned):
    Partition A1 -> Sub-Partition S1A1 and S2A1
    Partition A2 -> Sub-Partition S1A2 and S2A2
    Table B(Range-List Partitioned):
    Partition B1 -> Sub-Partition S1B1 and S2B1
    Partition B2 -> Sub-Partition S1B2 and S2B2
    I would like to EXCHANGE SUBPARITION A.S1A1 with B.S1B1, and S2A1 with S2B1 and S1A2 with S1B2 ...so on. Which means, how do I exchange subpartitions between two similar tables?
    The following statement does not work...
    ALTER TABLE A EXCHANGE SUBPARTITION S1A1
    WITH TABLE B SUBPARTITION S1B1 INCLUDING INDEXES;
    Please advice.

    Hi,
    ALTER TABLE A EXCHANGE SUBPARTITION S1A1 WITH TABLE B INCLUDING INDEXES;
    Read the document
    http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10739/partiti.htm
    Regards
    Hitgon

  • Select data from a table and a view: field with same content and different type

    hi all,
    I need data from a table hrp1001 and a view V_USR_NAME. What they have in common are the content of the fields SOBID and BNAME .
    It will be easier if those fields add a same type but they dont.
    Any suggestions for a workaround?
    Thanks

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Help to create SUBPARTITIONS

    HI,
    I am getting error while creating a SUBPARTITION for my table.
    CREATE TABLE Tab1
    col1 NUMBER(12),
    col2 CHAR(1 BYTE),
    col3 CHAR(1 BYTE),
    col4 NUMBER(12)
    PARTITION BY LIST (col1 )
    SUBPARTITION BY HASH (col4)
    SUBPARTITION TEMPLATE(
    SUBPARTITION SP_1 TABLESPACE C_D
    PARTITION PAR_0 VALUES (0)
    TABLESPACE C_D
    Error
    SUBPARTITION BY HASH (col4)
    ERROR at line 9:
    ORA-00922: missing or invalid option
    The syntax is all correct... i am not understanding where i am going wrong. Can anyone tell me my mistake.
    Thanks
    Sami

    What Hoek said is correct, at least for 10.2.
    11.2 supports list/hash and your code works as expected (after changing the tablespace to users):
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    With the Partitioning, Real Application Clusters, OLAP, Data Mining
    and Real Application Testing options
    SQL> CREATE TABLE Tab1
      2  (
      3  col1 NUMBER(12),
      4  col2 CHAR(1 BYTE),
      5  col3 CHAR(1 BYTE),
      6  col4 NUMBER(12)
      7  )
      8  PARTITION BY LIST (col1 )
      9  SUBPARTITION BY HASH (col4)
    10  SUBPARTITION TEMPLATE(
    11  SUBPARTITION SP_1 TABLESPACE users
    12  )
    13  (
    14  PARTITION PAR_0 VALUES (0)
    15  )
    16  TABLESPACE users;
    Table created.
    SQL>But you didn't tell us your Oracle version so.....

  • Doubt in abap coding

    Hi Experts,
    I have doubt, i have an internal table with four column. like below.
    KSCHL     VALUE      DIFF
    ZMBO     1.25     12.56
    ZMBO     2.31     12.56
    ZMBO     4     12.56
    ZMBO     5     12.56
    ZCHL     4.31     16.87
    ZCHL     5.21     16.87
    ZCHL     7.35     16.87
    ZNLM     0.005     8.03
    ZNLM     0.125     8.03
    ZNLM     3.65     8.03
    ZNLM     4.25     8.03
    Now i want to print the above internal table like below,
    KSCHL     VALUE     DIFF     
    ZMBO     1.25     12.56     
    ZMBO     2.31     12.56     
    ZMBO     4     12.56     
    ZMBO     5     12.56     
              ZMBO TOTAL     12.56
    ZCHL     4.31     16.87     
    ZCHL     5.21     16.87     
    ZCHL     7.35     16.87     
              ZCHL TOTAL     16.87
    ZNLM     0.005     8.03     
    ZNLM     0.125     8.03     
    ZNLM     3.65     8.03     
    ZNLM     4.25     8.03     
              ZNLM TOTAL     8.03
    How to print this? Can any one help this. Point will be sure.
    Mohana

    Want headings?
    DATA:
      BEGIN OF myrec,
        kschl        TYPE kschl,
        value(4)     TYPE p DECIMALS 3,
        diff(4)      TYPE p DECIMALS 3,
      END OF myrec,
      itab LIKE STANDARD TABLE OF myrec.
    DATA: sv_diff(4)    TYPE p DECIMALS 3.
    TOP-OF-PAGE.
      WRITE:/1 'KSCHL',
             10 'Value',
             25 'Diff'.
    START-OF-SELECTION.
      PERFORM build_table.
      SORT itab.
      NEW-PAGE.
      LOOP AT itab INTO myrec.
        WRITE:/ myrec-kschl UNDER 'KSCHL',
                myrec-value UNDER 'Value',
                myrec-diff  UNDER 'Diff'.
        sv_diff = myrec-diff.
        AT END OF kschl.
          WRITE:/ 'Total', myrec-kschl,
                sv_diff under 'Diff'.
          SKIP.
        ENDAT.
      ENDLOOP.
    *&      Form  build_table
    FORM build_table.
      myrec-kschl = 'ZMBO'. myrec-value = '1.25'. myrec-diff = '12.56'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZMBO'. myrec-value = '2.31'. myrec-diff = '12.56'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZMBO'. myrec-value = '4.00'. myrec-diff = '12.56'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZMBO'. myrec-value = '5.00'. myrec-diff = '12.56'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZCHL'. myrec-value = '4.31'. myrec-diff = '16.87'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZCHL'. myrec-value = '5.21'. myrec-diff = '16.87'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZCHL'. myrec-value = '7.35'. myrec-diff = '16.87'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZNLM'. myrec-value = '0.005'. myrec-diff = '8.03'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZNLM'. myrec-value = '0.125'. myrec-diff = '8.03'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZNLM'. myrec-value = '3.65'. myrec-diff = '8.03'.
      APPEND myrec TO itab.
      myrec-kschl = 'ZNLM'. myrec-value = '4.25'. myrec-diff = '8.03'.
      APPEND myrec TO itab.
    ENDFORM.                    " build_table
    And the Output
    KSCHL    Value          Diff        
    ZCHL        7.350         16.870    
    ZCHL        5.210         16.870    
    ZCHL        4.310         16.870    
    Total ZCHL                16.870    
    ZMBO        1.250         12.560    
    ZMBO        2.310         12.560    
    ZMBO        4.000         12.560    
    ZMBO        5.000         12.560    
    Total ZMBO                12.560    
    ZNLM        4.250          8.030    
    ZNLM        3.650          8.030    
    ZNLM        0.125          8.030    
    ZNLM        0.005          8.030    
    Total ZNLM                 8.030    

  • Configure Universal Adapter 2 generate New BAW Tables or use Existings OBAW

    Hi Experts,
    i have a doubt on if New OBAW tables have to be created as we add new subject areas from Universal Adapter Containers
    or can use existing OBAW tables that are generated from Other containers.
    For Example:
    Our Existing contianer is PeopleSoft 9.0 and OBAW Tables are created usign Peoplesoft Container.
    of all the subject areas from Peoplesoft Containers, Only Workforce Profile and HR Payroll is used.
    as the container is created using Peoplesoft 9.0, all the Tables (532 tABLES) are created for all the subject areas.
    now, we are planning to use Universal Adapters to configure rest of the subject areas like Absence Managementr and Recruitment because they are maintained by Third Party Vendors which have no relation with Peoplesoft.
    my doubt is,
    1. if i can use the same Existing OBAW Tables for Universal Adapters or create NEW OBAW tables using Universal Adapter container.
    2. if ii have to create New tables using Universal Adapter containers, all the table belonging to other Universal Adapters Subject areas like Loyalty Analytics, call center analytics are also created by default. how to avaoid this. i tried to create OBAW by creating a container with Only HR-Absence Management subject area and Recruitment subject area, unfortunatley, all the tables are again created.
    3. it looks like there are common dimension files used for this Universal Subject areas, is it Mandory to use them to Populate HR-Absence Managment subject area.
    Please HELP
    Is there is a good refernce guides on how to configure all this espically with Universal adapters in Out side world or in Metalink
    Thanks
    Kumar

    Please take a look at this article which states SYSDATE is not supported in a
    where clause.
    http://www.oracle.com/technology/pub/articles/bpel_cookbook/qualcomm-bpel.html
    Excerpt from the article:
    Here are three important things you should do in implementing the above design:
    Have the status of the record being processed stored in the database. The status includes the process state, next process attempt time, and processing attempt count.
    Create an updatable view that exposes only records that are ready to be processed. A view is needed because the database adapter cannot handle a where clause that compares against SYSDATE.
    Design logic that determines if a process instance that has faulted should be retried and when the retry should occur. This information will be updated in the database by use of a stored procedure. This can also be done with an update partner link and additional logic in BPEL.
    mahalo,
    a iii

  • Selecting records from DEFAULT range-list subpartition

    Is it possible to select records which belong to DEFAULT subpartition of a certain partition of a RANGE-LIST partitioned table, using subpartition pruning? Our task assumes creating partitions and subpartitions in a table dynamically before running ETL. But sometimes due to complexity of the path subpartition key goes from staging data to materialized views in data warehouse, we cannot predict all subpartition key values upfront. We can create DEFAULT subpartition for every partition though, and have Oracle place records which don't match any subpartition condition into that subpartition.
    But later we need to split DEFAULT subpartition so that all records will go into their dedicated subpartitions, and DEFAULT will be left empty - other layers of our application need all records to be stored in subpartition other than DEFAULT in order to be available. For that, we need to know which keys are stored in DEFAULT subpartition. And the question is - how can we effectively achieve that?
    The obvious "brute force" approach is to issue a query like:
    select distinct subpart_key from mytable partition (myrangepartition) where not subpart_key in (list of all subpartition key values for this partition)
    but it does not use partition pruning - I have checked execution plan. While it is possible to use only DEFAULT partition, this query will iterate through all subpartitions, which is huge performance impact. How can we instruct Oracle to use only DEFAULT subpartition?

    is the solution. I have overlooked this syntax - now my life is much easier.

Maybe you are looking for

  • How to install CC Photoshop/Lightroom 5 to MAC

    I purchased the one year CC for Photographers last week and I have not been able to install the Photoshop or Lightroom 5 to my MAC. When I go through the download process I keep on getting and ERROR, which says: Exit Code:7 Please see specific errors

  • User Status LKD is active(ORDTMC1001)

    Hi, While doing capital purchase order through internal order a message is being appeard as "User status LKD is active(ORDTMC1001). What could be the possible solution ? Best Regards, Samrat Roy

  • Using new version iPhoto

    I just bought imac and used migration asst. to transfer my old files. When I was setting up the new computer it asked if I wanted to update the iPhoto, I said yes and have not been able to use iPhoto. I have all of my old pictures on the computer and

  • Peru - connectivi​ty troubles

    I have an 8830 based in Canada with Bell. In Peru the sim card doesn't seem to work at all. The locals say this is a common issue. Does anyone have a solution, please!

  • PrintStream Problem, please help!

    My goal is to create and print to a file. The program will create the file but won't print to it. I can't find anything wrong, please take look and help if you can. import java.io.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; i