Remove partition key from partitoned table

can somebody help me with a sql syntax to remove a partition key from a partiton table . The scenario is explained as follows:
create table t1 (c1 number, c2 number ,c3 number)
partition by range (c1, c2)
(partition p1 values less than 11,
partition p1 values less than 21,
partition p1 values less than 31 );
i have data in this table and lot of indexes built, so i cannot drop this table to recreate it.
All i want is to remove c1 from partition key (c1,c2).
I will appreciate if somebody can give me a SQL syntax for this.
Ajay Nerumati.

Have you used the debugger and checked that the selectedRowKey is filled?
Can you elaborate what you mean by {qoute} ...does not work ...>
Do you have a reason not to use the current selection listener selectionListener="#{bindings.NotificationOfDifficultiesVO.collectionModel.makeCurrent}" on your table to let the framework do the work for you and then simply call the delete method on the VO?
Timo

Similar Messages

  • How to remove foreign key from table?

    i want a query from which i will remove foreign key from the table. plz help me in it. the table is created as follows:
    CREATE TABLE cw06_course
         (coursecode NUMBER(4) CONSTRAINT coursecode_pk PRIMARY KEY,
         department NUMBER(4) CONSTRAINT course_department_nn NOT NULL,
         coursename VARCHAR2(25),
         courseleasder NUMBER(4),
         CONSTRAINT course_department_fk FOREIGN KEY (department) REFERENCES cw06_department(deptno));

    parent keys not foundWell, while the constraint was not available (dropped), someone took the opportunity and inserted rows into your child table that do not have a corresponding value in your parent table.
    Why was the constraint dropped in first place? why did you give someone the opportunity to insert constraint violating value into the table?
    You must either:
    1). remove the child rows not found in parent
    2). create parent rows fr missing child rows.
    3). enable novalidate the constraint so existing values can remain without parent but future rows must confirm.

  • How to remove the bookmark from the table of contents?

    Hi everyone, I have a question:
    How to remove the bookmark from the table of contents in Captivate 6?
    Regards...

    Doug, your frustration is making you "bug" gun trigger happy. LOL
    LOL, I suppose I have.
    I believe the answer you are looking for is in the publishing preferences: under LMS advanced settings, look for the option: never send resume data.
    [can someone please confirm this - I am not at a desktop now]
    Anyhow, selecting this option will stop resume data - so the lesson will treat even returning learners as new. Hopefully, this will work for you.
    This works! Thank you again!
    *but* Why isn't Captivate asking the learner to make the choice of whether to start over or resume. It does this correctly if the lesson is published stand-alone.
    Thanks again!

  • Best way to change partition key on existing table

    Hi,
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    Thanks

    >
    Using Oracle 11.20.3 on AIX.
    We have a table about 800 million rows and 120gb in size.
    Want to try copies oif this table to evalaute different partitiong strategies.
    What is the quickest way to do this?
    Would have liked say datapump table 1 tro disk and datapumo import the data to new table but do the tables need to be of the same format.
    >
    First your subject asks a different question that the text you posted: Best way to change partition key on existing table. The answer to that question is YOU CAN'T. All data has to be moved to change the partition key since each partition/subpartition is in its own segment. You either create a new table or use DBMS_REDEFINITION to redefine the table online.
    Why do you want to export all data to a file first? That just adds to the time and cost of doing the op.
    What problem are you trying to use partitioning to solve? Performance? Data maintenance? For performance the appropriate partitioning key and whether to use subpartitions depends on the types of queries and the query predicates you typically use as well as the columns that may be suitable for partition keys.
    For maintenance a common method is to partition on a date by year/month/day so you can more easily load new daily/weekly/monthly data into its own partition or drop old data that no longer needs to be kept online.
    You should use a small subset of the data when testing your partitionings strategies.
    Can you do the partitioning offline in an outage window? If not then using the DBMS_REDEFINITION is your only option.
    Without knowing what you are trying to accomplish only general advice can be given. You even mentioned that you might want to use a different set of columns than the curren table has.
    A standard heap table uses ONE segment for its data (ignoring possible LOB segments). A partitioned/subpartitioned table uses ONE segment for each partition/subpartition. This means that ALL data must be moved to partition the table (unless you are only creating one partition).
    This means that every partitioning scheme that uses a different partition key requires ALL data to be moved again for that test.
    Provide some information about what problem you are trying to solve.
    >
    Is this quicker than datapump?
    >
    Yes - exporting the data simplying moves it all an additional time. Ok to export if you need a backup before you start.
    >
    Found artcle which talks about using merge option on datapump import to convert partitioned table to non-partitioned table.
    >
    How would that apply to you? That isn't what you said you wanted to do.

  • Need to remove duplicate rows from a table

    Hi Gurus ,
    I am using oracle 11.2.0.3 .
    SQL> desc osstage.S_EVT_ACT_X;
    Name                                      Null?    Type
    ROW_ID                                    NOT NULL VARCHAR2(15 CHAR)
    LAST_UPD                                  NOT NULL DATE
    PAR_ROW_ID                                NOT NULL VARCHAR2(15 CHAR)
    ATTRIB_17                                          NUMBER(22,7)
    ATTRIB_26                                          DATE
    ATTRIB_02                                          VARCHAR2(100 CHAR)
    PROCESS_TIMESTAMP                                  TIMESTAMP(6);
    now when i give the below command it gives the error as someone has disabled the constraint accidently .
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1;
    Error starting at line 3 in command:
    alter table s_evt_act_x enable constraint S_EVT_ACT_X_P1
    Error report:
    SQL Error: ORA-02437: cannot validate (OSSTAGE.S_EVT_ACT_X_P1) - primary key violated
    02437. 00000 -  "cannot validate (%s.%s) - primary key violated"
    *Cause:    attempted to validate a primary key with duplicate values or null
               values.
    *Action:   remove the duplicates and null values before enabling a primary
               key.
    Can you please guide me with this issue .

    Please refer
    Script: Deleting Duplicate Rows from a Table (Doc ID 31413.1)
    How to Find or Delete Duplicate Rows in a Table (Doc ID 1004425.6)

  • How can we remove the key from the dataset which has json

    uid
    id
    Json
    4588
    51
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    4589
    52
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    4590
    53
    { "key": "1/0/234", "element1":{ "a":10 "b": "test1" } }
    I have the above dataset resulting from merge operation .
    UID -Integer data type
    ID- Integer data type
    Json- String data type holding json document
    How can I remove  the " key" element from the json field  and make my dataset look like 
    Expected output which will strip of key value pair from the json column
    uid
    id
    Json
    4588
    51
    { "element1":{ "a":10 "b": "test1" } }
    4589
    52
    { "element1":{ "a":10 "b": "test1" } }
    4590
    53
    { "element1":{ "a":10 "b": "test1" } }
    Mudassar

    Hello Mudassar,
    In SQL Server / T-SQL we don't have a native JSON support, so you would have to implement a solution on your own = parsing the string and remove the "Key" + it's value.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How do you remove the borders from a table item

    In OAF I have a set of data stored in a table that I must display. However, I must make it look like it is not in a table. I can't use a tablelayout because it is a set of records and records are constantly being added. How do I remove the borders and the pagination from the table?

    I think you can't do anything about this.
    Change you design as per Browser Look and Feel standards.
    http://www.oracle.com/technology/tech/blaf/index.html
    --Prasanna                                                                                                                                                                                                                                                                                                                                                       

  • How to remove a column from alv table

    Hi All
    How to remove a specific column from alv table.?
    Thanks & Regards
    SUN

    For delete u can follow the above post..
    Fo making invisible :
    data m_col type ref to cl_salv_wd_column.
    m_col = alv_mode->IF_SALV_WD_COLUMN_SETTINGS->GET_COLUMN (' col1' ).
    m_col->SET_VISIBILITY( '01'  ).

  • Problem removing focused object from a table

    Hi.
    I have a problem removing a component that is focused from a table. The
    whole row is removed except a single component (JSpinner) in one row.
    My table has three columns, the first two are String fields
    (not editable) and the last is a JSpinner. Since there is no
    Default cell renderer or cell editor for JSpinner I had to
    create them.
    So, if no element of the row is focused then calling the function:
    public void clearTable() {
    setVisible(false);
    dataVector.removeAllElements(); // clear data vector
    setVisible(true);
    works just fine
    but if a spinner in a row is focused them that spinner is left alone "floating" on an otherwise empty table.
    Questions:
    1) Any one has an ideia of what might be the problem?
    2) Do I have to play with Focus to solve this? (hate the idea,
    since always been told to avoid messing with focus, because
    of the problems it normally brings)
    Thanks in advance for the help,
    Rgds,
    Jorge

    The problem is that you need to properly stop the editing operation first.if( myTable.isEditing() ) {
        // If you want to throw away any edits use...
        myTable.getCellEditor().cancelCellEditing();
        // If you want to apply any edits, then end use...
        myTable.getCellEditor().stopCellEditing();

  • First attempt to remove duplicate rows from a table...

    I have seen many people asking for a way to remove duplicate rows from data. I made up a fairly simple script. It adds a column to the table with the cell selected in it, and adds the concatenation of the data to the left into that new column. then it reads that into a list, and walks through that list to find any that are listed twice. Any that are it marks for DELETE.
    It then walks through to find each one marked for delete and removes them (you must go from bottom to top to do this, otherwise your row markings for delete don't match up to the original rows anymore). Last is to delete the column we added.
    tell application "Numbers"
    activate
    tell document 1
    -- DETERMINE THE CURRENT SHEET
    set currentsheetindex to 0
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of (tables whose selection range is not missing value)
    end tell
    if x is not 0 then
    set the currentsheetindex to i
    exit repeat
    end if
    end repeat
    if the currentsheetindex is 0 then error "No sheet has a selected table."
    -- GET THE TABLE WITH CELLS
    tell sheet currentsheetindex
    set the current_table to the first table whose selection range is not missing value
    end tell
    end tell
    log current_table
    tell current_table
    set list1 to {}
    add column after column (count of columns)
    set z to (count of columns)
    repeat with j from 1 to (count of rows)
    set m to ""
    repeat with i from 1 to (z - 1)
    set m to m & value of (cell i of row j)
    end repeat
    set value of cell z of row j to m
    end repeat
    set MyRange to value of every cell of column z
    repeat with i from 1 to (count of items of MyRange)
    set n to item i of MyRange
    if n is in list1 then
    set end of list1 to "Delete"
    else
    set end of list1 to n
    end if
    end repeat
    repeat with i from (count of items of list1) to 1 by -1
    set n to item i of list1
    if n = "Delete" then remove row i
    end repeat
    remove column z
    end tell
    end tell
    Let me know how it works for y'all, it worked good on my machine, but I know localization is causing errors sometimes when I post things.
    Thanks,
    Jason
    Message was edited by: jaxjason

    Hi jason
    I hope that with the added comments it will be clear.
    Ask if something is always opaque.
    set {current_Range, current_table, current_Sheet, current_Doc} to my getSelection()
    tell application "Numbers09"
    tell document current_Doc to tell sheet current_Sheet to tell table current_table
    set list1 to {}
    add column after column (count of columns)
    set z to (count of columns)
    repeat with j from 1 to (count of rows)
    set m to ""
    tell row j
    repeat with i from 1 to (z - 1)
    set m to m & value of cell i
    end repeat
    set value of cell z to m
    end tell
    end repeat
    set theRange to value of every cell of column z
    repeat with i from (count of items of theRange) to 1 by -1
    (* As I scan the table backwards (starting from the bottom row),
    I may remove a row immediately when I discover that it is a duplicate *)
    set n to item i of theRange
    if n is in list1 then
    remove row i
    else
    set end of list1 to n
    end if
    end repeat
    remove column z
    end tell
    end tell
    --=====
    on getSelection()
    local _, theRange, theTable, theSheet, theDoc, errMsg, errNum
    tell application "Numbers09" to tell document 1
    set theSheet to ""
    repeat with i from 1 to the count of sheets
    tell sheet i
    set x to the count of tables
    if x > 0 then
    repeat with y from 1 to x
    (* Open a trap to catch the selection range.
    The structure of this item
    «class
    can't be coerced as text.
    So, when the instruction (selection range of table y) as text
    receive 'missing value' it behaves correctly and the lup continue.
    But, when it receive THE true selection range, it generates an error
    whose message is errMsg and number is errNum.
    We grab them just after the on error instruction *)
    try
    (selection range of table y) as text
    on error errMsg number errNum (*
    As we reached THE selection range, we are here.
    We grab the errMsg here. In French it looks like:
    "Impossible de transformer «class
    The handler cuts it in pieces using quots as delimiters.
    item 1 (_) "Impossible de transformer «class » "
    item 2 (theRange) "A2:M25"
    item 3 (_) " of «class NmTb» "
    item 4 (theTable) "Tableau 1"
    item 5 (_) " of «class NmSh» "
    item 6 (theSheet) "Feuille 1"
    item 7 (_) " of document "
    item 8 (theDoc) "Sans titre"
    item 9 ( I drop it ) " of application "
    item 10 ( I drop it ) "Numbers"
    item 11 (I drop it ) " en type string."
    I grab these items in the list
    {_, theRange, _, theTable, _, theSheet, _, theDoc}
    Yes, underscore is a valid name of variable.
    I often uses it when I want to drop something.
    An alternate way would be to code:
    set ll to my decoupe(errMsg, quote)
    set theRange to item 2 of ll
    set theTable to item 4 of ll
    set theSheet to item 8 of ll
    set theDoc to item 10 of ll
    it works exactly the same but it's not so elegant.
    set {_, theRange, _, theTable, _, theSheet, _, theDoc} to my decoupe(errMsg, quote)
    exit repeat (*
    as we grabbed the interesting datas, we exit the lup indexed by y.*)
    end try
    end repeat -- y
    if theSheet > "" then exit repeat (*
    If we are here after grabbing the datas, theSheet is not "" so we exit the lup indexed by i *)
    end if
    end tell -- sheet
    end repeat -- i
    (* We may arrive here with two kinds of results.
    if we grabbed a selection, theSheet is something like "Feuille 1"
    if we didn't grabbed a selection, theSheet is the "" defined on entry
    and we generate an error which is not trapped so it stops the program *)
    if theSheet = "" then error "No sheet has a selected table."
    end tell -- document
    (* Now, we send to the caller the interesting datas :
    theRange "A2:M25"
    theTable "Tableau 1"
    theSheet "Feuille 1"
    theDoc "Sans titre" *)
    return {theRange, theTable, theSheet, theDoc}
    end getSelection
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d (*
    Cut the text t in pieces using d as delimiter *)
    set l to text items of t
    set AppleScript's text item delimiters to "" (*
    Resets the delimiters to the standard value. *)
    (* Send the list to the caller *)
    return l
    end decoupe
    --=====
    Have fun
    And if it's not clear enough, you may ask for more explanations.
    Yvan KOENIG (from FRANCE mardi 27 janvier 2009 21:49:19)

  • Remove a row from multiple tables

    Hello,
    I have a form that has what appears to be one table.  Since I needed 30 columns (29 of them are single character fields) I had to use 2 table objects.  Then I needed the ability to add and remove rows.  Adding a row at the end is easy enough.  Deleting a specific row is the problem.  At the moment, I added a third table which has a header row and a item body row.  the body row is a button with the intention of removing that entire row from the large table.  This means it needs to remove the row from all 3 tables.
    My structure is:
    form1
    (Some other flowed subform that doesn't matter for us)
    SubformPersonnel (a flowed subform)
    SubformHeader (a positioned subform)
    TextOverallHeader (text to label the oeverall 3 tables)
    ButtonAddRow (adds a row to the end of all 3 tables)
    SubformPersonnelTable (a positioned subform)
    ContractorTableRemove (a table with 1 column for the Remove button)
    HeaderRow (A hidden row to align the table with the other 2)
    Item (A row with the Remove button)CellRemoveButton (the cell with the remove button and associated JavaScript)
    ContractorTableLeft (a table with the left 15 printed columns)
    HeaderRow
    Contractor (A row of data to be removed when CellButton above is clicked)
    ContractorTableRight (a table with the right 15 printed columns)
    HeaderRow
    Contractor (A row of data to be removed when CellButton above is clicked)
    (Some other flowed subforms that I am not worried about at the moment)
    The 3 tables are aligned so the headers all line up, with no spaces between them.  The body rows then line up and this looks like one large table.  From left to right, they are:
    ContractorTableRemove, ContractorTableLeft, ContractorTableRight
    So Item and Contractor rows are added when ButtonAddRow is clicked in the overall header.  The intial count is set to 8 for each table, so I get 8 rows at startup. The minimum count is set to 1 for each.  I know that each row of each table has the same index number because I filled those into a cell in each table durig the cell's initialize.  This line, in the CellRemoveButton's click event deletes that cell's row in that table:
    this.parent.parent._Item.removeInstance(this.parent.index);
    I have tried all sorts of ways to delete the same row (using same index #) in the other 2 tables: ContractorTableLeft and ContractorTableRight, but don't seem to be getting the correct syntax correct.  I have tried hard coding the references, using .parent as shown below, and also tried using an index of 1 just to try deleting a row with no results.
         this.parent.parent.parent.ContractorTableLeft._Contractor.removeInstance(this.parent.inde x);
    Can someone get me the correct syntax here?
    I have seen examples of putting a hidden delete button on each table and clicking that, but I am concerned that it will get in the way of the tables on either side of the table it is in.  I reeally want to just reference the row and remove it so I can avoid any problems these additional delete problems may cause.
    I have copied the form to https://acrobat.com/#d=7M8R50rEHf4AaVXppwyKLw

    Thank you, Niall.  Much appreciated!
    The Delete button was more to make sure one could delete these outside a button in the actual row and I see I had the index wrong such that I was deleting the second row and not the first.  I had toyed with using this as a hidden button if I could pass the index to the event's function.
    I had not thought of adding the reference to each row as a variable.  It seems to work very well.
    For future reference to others, here is the code from the cellRemoveButton click event:
         // Declare some variables
         var i = this.parent.index;
         var oContractorLeft = ContractorTableLeft.Contractor;
         var oContractorRight = ContractorTableRight.Contractor;
         // Remove this row by accessing its index within the set of 'Item' row instances of the parent table
         _Item.removeInstance(i);
          // Since this table is actually 3 tables, we need to remove the other two table's instances as well.
         // Their index should be the same, so we just need to get their names correct.
         oContractorLeft.instanceManager.removeInstance(i);
         oContractorRight.instanceManager.removeInstance(i);
          // removing the row doesn't trigger calculations in tables in the form's current target (fixed in later versions of Acrobat)
         // force calculations to fire so the ItemIndex field's value is updated according to the remaining row's indexes
         // see http://forms.stefcameron.com/2006/05/20/add-recalculate/
         xfa.form.recalculate(1);
    Again, thank you!
    Karl

  • Disable / Remove Control Key From Pop-Up Virtual Keyboard

    Hello. I am setting up a kiosk system using Microsoft Surface tablets. I wish to use the win8 virtual keyboard along with chrome in kiosk mode to run a web app. I am trying to edit the Keyboard Mapping in registry, which works with the physical keyboard
    but not with the virtual one. All I need to do is disable the control key so users can't do anything with browser shortcuts. Also, I can't just disable them in JS because the browser captures them before they even reach the js engine. 
    Thanks!

    Hi,
    On Screen  Keyboard is one application that is used to simulate the keyboard to send the Key Events to system. It is not a physical keyboard but a built-in tool,
    After a lot of research, I am afraid there isn’t a solid way of disabling the Windows key on virtual keyboard, including the control key.
    Besides, Kiosk mode is  available for Internet Explorer according to the link below, and it is available for Internet Explorer 11 after a test:
    http://support.microsoft.com/kb/154780
    Another thing is, it fails to start the Kiosk mode with Chrome after remove Internet Explorer from the control panel, I tried with a test.
    Regards
    Wade Liu
    TechNet Community Support

  • Deleting rows by key from several tables

    Hello! 
    One of action of my stored procedure is deleting rows from several tables on a key , that I'm getting through statement :
    delete from table3 where key_column in ();
    delete from table4 where key_column in ();
    commit;
    select key_column from Table!
    minus
    select key_column from Table2
    Unfortunately the number of lines mentioned by this statement isn't known in advance .
    How do You think , is better way to
    -- execute select each time for every delete-statement or
    -- create table as select result set and then select again keys for each delete- ststement or
    I'm usung 11.2.0.3
    Thanks and regards,
    Pavel

    By using : 1.trigger 2. on delete cascade you can achieve this.
    OraFAQ Forum: SQL & PL/SQL » delete rows from multiple tables (more than 2 tables)
    Regards
    Girish Sharma

  • Removal of data from 1 table after comparing with other table

    Hi,
    I have 2 table. Both have same primary key i.e. WO_ID. 1st table wrk_ord have no redundant data and the 2nd table wo_audit have few redundant data. Both table are related with WO_ID. Now I want to remove the redundant data from table wo_audit so that the uniq WO would be same in both the table. both the table are very huge. WO_ID table have 31million of record. I ran query
    delete from wo_audit where wo_id not in (select wo_id from wrk_ord);
    this query throw an error ora-01555. I just want to know the how can optimize this query.
    Thanks.

    Hi,
    delete from wo_audit where wo_id not in (select wo_id from wrk_ord);AFAIk, you not removing redundant data, but you are removing the data which does not exists in wrk_ord. Try to check things from business perspective.
    Tune the value of the UNDO_RETENTION parameter, check the the below one
    select max(maxquerylen) from v$undostat;
    - Pavan Kumar N
    Edited by: Pavan Kumar on Apr 8, 2011 1:36 PM

  • How to remove empty row from rfc table output.

    Hello,
      I am using adaptive rfc and printing table output. The table rows start from 2nd row, the first row being empty. How can I remove the empty first row.
    Here is what I tried.
    wdContext.nodeDataSource().nodeTableOutput().moveNext();
    and
    wdContext.nodeDataSource().nodeTableOutput().moveTo(1);
    Neither of them worked. Any clue is appreciated.
    Srinivas

    IWDNodeElement first = wdContext.nodeDataSource().nodeTableOutput().getElementAt(0);
    wdContext.nodeDataSource().nodeTableOutput().removeElement(first);
    Armin

Maybe you are looking for

  • How to include the mysql-connector in a simple .jar file

    Well I started up with java again. Just messing around. This project I'm making now is just plain simple, I have a program thats going to read a table in a database from a server I have here at home. It works fine if I do like this: java javafil to r

  • My external drive is shared automatically on second accout...

    Hi, I dont want my external drive (formated partially to FAT32 and journaled) to be seen on second account - my wifes - (no administrator account for her) but it is at the moment. any suggestions? thanks in advance M

  • BI 7.0 BEx report in Web

    Hi, We are using NW2004s. I vreated the query in Query designer and I tried to view the query in web then it is not picking up the correct URL,it is taking the following URL: http:///irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2

  • Why do some letters/words not print exactly as typed

    my converted letters are showing misspellings.  Why does this happen and can it be fixed?

  • Geting the output type of spool requests

    Hi all: I was wondering how to get the output type (called Message type "KSCHL" in table NAST) for a certain spool request (those are saved on table TSP01). It seems like these tables are unlinkables each other. When I print a smartform, I choose the