How to partition the data dynamically

Hi,
I've the data which goes on increasingly day by day. So, for the sake of performance i wanted to go for partitioning. i want to divide the data into partitions by months. How can i acheive this one. I do not want to hard code it to the year like 2007 or 2008 like this.The problem with the hard coding is again i've to make it to 2008 in the next year.
Regards,
Alok Dubey

Long ago have tried something like that:
Create Procedure:
BEGIN
1. looking for you date
2. If date … then
3. EXECUTE EMEDIATE ‘create partition ….’
EXECUTE EMEDIATE ‘create partition on idex….’
4. Drop old partition if needed
END
Setup scheduler for you procedure

Similar Messages

  • How to print the data Dynamically in smartforms

    Hi Experts,
    I need to print the data dynamically in different windows on the same page.For example in the first window 25 records,2nd window 25 records and 3rd window 25 records.I need it dynamically.How to achieve this?

    Hi,
    If you have an internal table which fetches the data... Then you can have table in each window and in the data tab give from row and to row values to display how many records and from where to where you want to display.
    Regards,
    -Sandeep

  • How to add the data dynamically in data grid

    Hi,
    I got a stuck up in using JSF as I am trying to retrieve a value of a text box on clicking a button in the datagrid.
    Please suggest me a solution for his

    Please consider filing bugs in Jira at [http://javafx-jira.kenai.com|http://javafx-jira.kenai.com/]. Without your bugs being filed there is no guarantee we'll know to fix them! File them against 'runtime', for the 'control' component, and they'll turn up in my inbox.
    Thanks,
    Jonathan

  • How to delete the data from partition table

    Hi all,
    Am very new to partition concepts in oracle..
    here my question is how to delete the data from partition table.
    is the below query will work ?
    delete from table1 partition (P_2008_1212)
    we have define range partition ...
    or help me how to delete the data from partition table.
    Thanks
    Sree

    874823 wrote:
    delete from table1 partition (P_2008_1212)This approach is wrong - as Andre pointed, this is not how partition tables should be used.
    Oracle supports different structures for data and indexes. A table can be a hash table or index organised table. It can have B+tree index. It can have bitmap indexes. It can be partitioned. Etc.
    How the table implements its structure is a physical design consideration.
    Application code should only deal with the logical data structure. How that data structure is physically implemented has no bearing on application. Does your application need to know what the indexes are and the names of the indexes,in order to use a table? Obviously not. So why then does your application need to know that the table is partitioned?
    When your application code starts referring directly to physical partitions, it needs to know HOW the table is partitioned. It needs to know WHAT partitions to use. It needs to know the names of the partitions. Etc.
    And why? All this means is increased complexity in application code as this code now needs to know and understand the physical data structure. This app code is now more complex, has more moving parts, will have more bugs, and will be more complex to maintain.
    Oracle can take an app SQL and it can determine (based on the predicates of the SQL), which partitions to use and not use for executing that SQL. All done totally transparently. The app does not need to know that the table is even partitioned.
    This is a crucial concept to understand and get right.

  • Dynamically built query on execution How to save the data in Object Type

    Hi,
    In pl/sql I am building and executing a query dynamically. How can I stored the output of the query in object type. I have defined the following object type and need to store the
    output of the query in it. Here is the Object Type I have
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPE AS OBJECT(
    pkid NUMBER,
    pkname VARCHAR2(100);
    pkcity VARCHAR2(100);
    pkcounty VARCHAR2(100)
    CREATE OR REPLACE TYPE DEMO.FIRST_RECORDTYPETAB AS TABLE OF FIRST_RECORDTYPE;Here is the query generated at runtime and is inside a LOOP
    --I initialize my Object Type*
    data := new FIRST_RECORDTYPETAB();
    FOR some_cursor IN c_get_ids (username)
    LOOP
    x_context_count := x_context_count + 1;
    -- here I build the query dynamically and the same query generated is
    sql_query := 'SELECT pkid as pid ,pkname as pname,pkcity as pcity, pkcounty as pcounty FROM cities WHERE passed = <this value changes on every iteration of the cursor>'
    -- and now I need to execute the above query but need to store the output
    EXECUTE IMMEDIATE sql_query
    INTO *<I need to save the out put in the Type I defined>*
    END LOOP;
    How can I save the output of the dynamically built query in the Object Type. As I am looping so the type can have several records.
    Any help is appreciated.
    Thanks

    hai ,
    solution for Dynamically built query on execution How to save the data in Object Type.
    Step 1:(Object creation)
    SQL> ED
    Wrote file afiedt.buf
    1 Create Or Replace Type contract_details As Object(
    2 contract_number Varchar2(15),
    3 contrcat_branch Varchar2(15)
    4* );
    SQL> /
    Type created.
    Step 2:(table creation with object)
    SQL> Create Table contract_dtls(Id Number,contract contract_details)
    2 /
    Table created.
    Step 3:(execution Of procedure to insert the dynamic ouput into object types):
    Declare
    LV_V_SQL_QUERY Varchar2(4000);
    LV_N_CURSOR Integer;
    LV_N_EXECUTE_CURSOR Integer;
    LV_V_CONTRACT_BR Varchar2(15) := 'TNW'; -- change the branch name by making this as input parameter for a procedure or function
    OV_V_CONTRACT_NUMBER Varchar2(15);
    LV_V_CONTRACT_BRANCH Varchar2(15);
    Begin
    LV_V_SQL_QUERY := 'SELECT CONTRACT_NUMBER,CONTRACT_BRANCH FROM CC_CONTRACT_MASTER WHERE CONTRACT_BRANCH = '''||LV_V_CONTRACT_BR||'''';
    LV_N_CURSOR := Dbms_Sql.open_Cursor;
    Dbms_Sql.parse(LV_N_CURSOR,LV_V_SQL_QUERY,2);
    Dbms_Sql.define_Column(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER,15);
    Dbms_Sql.define_Column(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH,15);
    LV_N_EXECUTE_CURSOR := Dbms_Sql.Execute(LV_N_CURSOR);
    Loop
    Exit When Dbms_Sql.fetch_Rows (LV_N_CURSOR)= 0;
    Dbms_Sql.column_Value(LV_N_CURSOR,1,OV_V_CONTRACT_NUMBER);
    Dbms_Sql.column_Value(LV_N_CURSOR,2,LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_BRANCH--'||LV_V_CONTRACT_BRANCH);
    Dbms_Output.put_Line('CONTRACT_NUMBER--'||OV_V_CONTRACT_NUMBER);
    INSERT INTO contract_dtls VALUES(1,CONTRACT_DETAILS(OV_V_CONTRACT_NUMBER,LV_V_CONTRACT_BRANCH));
    End Loop;
    Dbms_Sql.close_Cursor (LV_N_CURSOR);
    COMMIT;
    Exception
    When Others Then
    Dbms_Output.put_Line('SQLERRM--'||Sqlerrm);
    Dbms_Output.put_Line('SQLERRM--'||Sqlcode);
    End;
    step 4:check the values are inseted in the object included table
    SELECT * FROM contract_dtls;
    Regards
    C.karukkuvel

  • Is there a way of partitioning the data in the cubes

    Hello BPC Experts,
    we are currently running an Appset with 4 Applciations. Anyway two of these are getting really big.
    In BPC for MS there is a way to partitioning the data as I saw in the How tos.
    In NW Versions the BPC queries the Multiprovider. Is there a way to split the underlying Basis Cube to several (split by time or Legal Entity).
    I think this would help to increase the speed a lot as data could be read in parallel.
    Help is very much appreciated.
    Daniel
    Edited by: Daniel Schäfer on Feb 12, 2010 2:16 PM

    Hi Daniel,
    The short answer to your question is that, no, there is not a way to manually partition the infocubes at the BW level. The longer answer comes in several parts:
    1. BW automatically partitions the underlying database tables for BPC cubes based on request ID, depending on the BW setting for the cube and the underlying database.
    2. BW InfoCubes are very different from MS SQL server cubes (ROLAP approach in BW vs. MOLAP approach usually used in Analysis Services cubes). This results in BW cubes being a lot smaller, reads and writes being highly parallel, and no need for a large rollup operation if the underlying data changes. In other words, you probably wouldn't gain much from semantic partitioning of the BW cubes underlying BPC, except possibly in query performance, and only then if you have very high data volumes (>100 million records).
    3. BWA is an option for very large cubes. It is expensive, but if you are talking 100s of millions of records you should probably consider it. It uses a completely different data model than ROLAP or MOLAP and it is highly partition-able, though this is transparent to the BW administrator.
    4. In some circumstances it is useful to partition BW cubes. In the BW world, this is usually called "semantic partitioning". For example, you might want to partition cubes by company, time, or category. In BW this is currently supported through manually creating several basic cubes under a multiprovider. In BPC, this approach is not supported. It is highly recommended to not change the BPC-generated Infocubes or Queries in any way.
    5. If you have determined that you really need to semantically partition to manage data volumes in BPC, the current best way is probably to have multiple BPC applications with identical dimensions. In other words, partition in the application layer instead of in the data layer.
    Hopefully that's helpful to you.
    Ethan

  • How to find the Data Type of a column

    Dear All,
    How to find the Data Type of a Column dynamically in oracle Form.
    Thanks and Regards,
    Fazil
    Edited by: user11334489 on Aug 25, 2012 9:06 PM

    hi,
    you can use get_item_property built-in
    eg:
    declare
       l_item VARCHAR2(10);
    begin
       l_item := Get_Item_Property('item_name',DATATYPE);
    end;

  • How to append the data list bod (JList)

    how to append the data list box (JList)
    Message was edited by:
    raju_2reddy

    For this you will need a nested internal table. such that each column of the internal table should be declared as another internal table.
    Try something like this :
    " Lets say that the type of table that will be returned by the function BOM is ty_ret_tab, then declare as follows
    types begin of ty_tab,
    c1 type table of ty_ret_tab,
    c2 type table of ty_ret_tab,
    end of ty_tab.
    data gt_tab type standard table of ty_tab,
            gwa_tab like ty_tab.
    Now the question is how many columns should you declare ? Because you said that in a loop you intend to call a function which will return a internal table and this internal table you need to store in a column of another internal table. And if this is not fixed, you would need to do some dynamic programming to achieve this.
    But if we assume that there are fixed number of columns and fixed number of loops, then within the loop, you wiill have to simply move the data from the returned table to each of the columns. Then append the work area outside the loop.
    data field(30) type c.
    data c_tabix(10) type c.
    field-symbols <fs> type ret_tab.  " this should be
    Loop at itab.
    call function BOM...
    exporting...
    importing.....
    tables  ret_itab.
    c_tabix = sy-tabix.
    concatenate 'C' c_tabix into field.
    condense field.
    assign component  (field) of structure gwa_tab to <fs>.
    <fs> = ret_tab.   " Pass data to each column
    endloop.
    append gwa_tab to gt_tab.  " Now a single record with all columns containing an internal table is built.
    Hope this pseudo code helps.
    BR,
    Advait

  • How to pass the data from a input table to RFC data service?

    Hi,
    I am doing a prototype with VC, I'm wondering how VC pass the data from a table view to a backend data service? For example, I have one RFC in the backend system with a tabel type importing parameter, now I want to pass all the data from an input table view to the RFC, I guess it's possible but I don't know how to do it.
    I try to create some events between the input table and data service, but seems there is no a system event can export the whole table to the backend data service.
    Thanks for your answer.

    Thanks for your answer, I tried the solution 2, I create "Submit" button, and ser the mapping scope to  be "All data rows", it only works when I select at least one row, otherwise the data would not be passed.
    Another question is I have serveral imported table parameter, for each table I have one "submit" event, I want these tables to be submitted at the same time, but if I click the submit button in one table toolbar, I can only submit the table data which has a submit button clicked, for other tables, the data is not passed, how can I achieve it?
    Thanks.

  • How to select the data from a Maintainance View into an internal table

    Hi All,
    Can anybody tell me how to select the data from a Maintainance View into an internal table.
    Thanks,
    srinivas.

    HI,
    You can not retrieve data from A mentenance view.
    For detail check this link,
    http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ed2d446011d189700000e8322d00/content.htm
    Regards,
    Anirban

  • How to refresh the data in published HTML?

    Hi All,
    I have created a Process Engineering diagram, whcih represents flow of material from Equipment to another equipment.
    I have binded the diagram to data from the data base and saved/published as HTML to view it in browser. So far it is fine.
    But the next step is: What happens when the data changes in the data base? The generated HTML became just a static diagram which is of not much use. If i want to refresh the data, then I need to publish again !!
    Is there a way to make service calls from HTML and update the data dynamically in HTML display?
    Note: I am using VISIO 2013 Professional edition
    Venkat

    Hi,
    If we had saved/published Visiso drawing as HTML file, we could not refresh the data source to control the HTML data directly. We need to re-publish, I think you do not want to do it.
    Thus, I recommend you use JavaScript or coding to invoke and refresh the background database when you modified it.
    The following artile may also help you:
    http://www.mathworks.com/help/matlab/ref/refreshdata.html
    If you have any question related to Programming/Code, post in HTML forums for further assistance.
    Regards,
    George Zhao
    TechNet Community Support

  • How to download the data which is in the table?

    how to download the data which is in the table?
    every field data in the table i want to download and once the download is finished then i have to set the flag as 'download is finished ' as one field in table?
    can any one help me in this.
    Phani.
    Edited by: phani kumarDurusoju on Jan 9, 2008 6:36 AM

    One way is to Download the data Directly from the database table using the path SE11->Give table name ->Execute -> system ->List ->Save ->Local File
    There u can downlaad the data .
    The ither way is to use the code
    The Following Code will be helpfull to You
    Data :ITAB  TYPE TRUXS_T_TEXT_DATA,
            FILE  TYPE STRING.
             C_ASC     TYPE CHAR10   VALUE 'ASC',
    DATA: L_STATUS TYPE C,
           L_MESSAGE TYPE PMST_RAW_MESSAGE,
           L_SUBJECT TYPE SO_OBJ_DES.
    DATA: L_FILELENGTH TYPE I.
      PERFORM download_to_pc
                  TABLES
                     itab
                  USING
                     filename
                     c_asc
                     c_x
                  CHANGING
                     l_status
                     l_message
                     l_filelength.
    FORM DOWNLOAD_TO_PC TABLES   DOWNLOADTAB
                        USING    FILENAME
                                 FILETYPE TYPE CHAR10
                                 DELIMITED
                        CHANGING STATUS
                                 MESSAGE TYPE PMST_RAW_MESSAGE
                                 FILELENGTH TYPE I.
      DATA: L_FILE TYPE STRING,
            L_SEP.
      L_FILE = FILENAME.
      IF NOT DELIMITED IS INITIAL.
        L_SEP = 'X'.
      ENDIF.
      STATUS = 'S'.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          FILENAME                = L_FILE
          FILETYPE                = FILETYPE
          WRITE_FIELD_SEPARATOR   = L_SEP
        IMPORTING
          FILELENGTH              = FILELENGTH
        TABLES
          DATA_TAB                = DOWNLOADTAB
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22.
      IF SY-SUBRC <> 0.
        STATUS = 'E'.
        CASE SY-SUBRC.
          WHEN 1.
            MESSAGE = 'gui_download::file write error'.
          WHEN 2.
            MESSAGE = 'gui_download::no batch'.
          WHEN 3.
            MESSAGE = 'gui_download::gui refuse file transfer'.
          WHEN 4.
            MESSAGE = 'gui_download::invalid type'.
          WHEN 5.
            MESSAGE = 'gui_download::no authority'.
          WHEN 6.
            MESSAGE = 'gui_download::unknown error'.
          WHEN 7.
            MESSAGE = 'gui_download::header not allowed'.
          WHEN 8.
            MESSAGE = 'gui_download::separator not allowed'.
          WHEN 9.
            MESSAGE = 'gui_download::filesize not allowed'.
          WHEN 10.
            MESSAGE = 'gui_download::header too long'.
          WHEN 11.
            MESSAGE = 'gui_download::dp error create'.
          WHEN 12.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 13.
            MESSAGE = 'gui_download::dp error send'.
          WHEN 14.
            MESSAGE = 'gui_download::ubknown dp error'.
          WHEN 15.
            MESSAGE = 'gui_download::access denied'.
          WHEN 16.
            MESSAGE = 'gui_download::dp out of memory'.
          WHEN 17.
            MESSAGE = 'gui_download::disk full'.
          WHEN 18.
            MESSAGE = 'gui_download::dp timeout'.
          WHEN 19.
            MESSAGE = 'gui_download::file not found'.
          WHEN 20.
            MESSAGE = 'gui_download::dataprovider exception'.
          WHEN 21.
            MESSAGE = 'gui_download::control flush error'.
          WHEN 22.
            MESSAGE = 'gui_download::Error'.
        ENDCASE.
      ENDIF.
    ENDFORM.             "download_to_pc
    At The End Reward points.
    Please it's Required.
    Thanks ,
    Rahul

  • How to add the date field in the dso and info cube

    Hi all.
    I am new to bi 7. in the earlier version v hav to button to add the date field. but in the bi 7 der is no option so can any body tell me how to add the date field in the data targets
    Thanks & Regard
    KK

    my prob is solved
    KK

  • How to read the data in excel sheet

    Dear sir,
    How to read the data in excel sheet when i recieve a data serial communication... ie i have store a data in excel such that
    Cell A       Cell B
       A           Apple 
       B           Ball
       C           Cat
       D           Doll
    when i recieve A from serial communication i have to display Apple, and when i recieve B i have to display Ball and so on.. 

    Hi, 
    I would recommend you to have a look at the VI attached. It makes use of a VI named 'Read from Spreadsheet' to read the row and column data from the tab delimited excel file. The read data is then searched for the Alphabet specified and finally returns you the corresponding string. The test file used to validate the operation of the VI is also attached. 
    Trust this would help you solve the issue. 
    Regards, 
    Sagar G Yadav | Application Engineer | National Instruments
    Attachments:
    read_from_excel.vi ‏10 KB
    Book1.txt ‏1 KB

  • How to get the data from multiple nodes to one table

    Hi All,
    How to get the data from multiple nodes to one table.examples nodes are like  A B C D E relation also maintained
    Regards,
    Indra

    HI Indra,
    From Node A, get the values of the attributes as
    lo_NodeA->GET_STATIC_ATTRIBUTES(  IMPORTING STATIC_ATTRIBUTES = ls_attributesA  ).
    Similarily get all the node values from B, C, D and E.
    Finally append all your ls records to the table.
    Hope you are clear.
    BR,
    RAM.

Maybe you are looking for

  • How to install windows 8 on brand new macbook air

    Has anyone installed windows 8 via bootcamp on a new macbook air? I do not have a previous windows 7 on my mac either?

  • Itunes 10 and Microsoft 2007

    Since installing new version of ITunes my Outlook 2007 wont close properly and becomes inaccessible once I close it. HOW DO I GET HELP AND AN ANSWER TO THIS PROBLEM!!

  • Why is there a question mark in the Finder window?

    Why is there a question mark in the finder window that looks like this.     When I click the question mark in displays this message.                                                                                                                      

  • Used Ipod  with no Installation CD

    I bought a used Ipod 4th generation 20 gb with a click wheel i guess... Reading the manual apparently in comes with an installation cd origanally but I do not have it and my computer keeps saying ... USB Device not recognized ,,, Blah blah blah ... H

  • LT06 enhancement - How to update Storage type and Storage section

    Hi, My requirement is to update Storage bin, Storage type and Storage section, while creating Transfer order from through LT06. So I used the enhancement MWMTO003 to update Storage Bin in LT06 and it is also working. Similarly I need to update Storag