Importing only the new rows in atable

Hi,
in 8.1.7 version is there any option for imp that let only import the new lines in a table and keep the ancient rows ?
Many thanks.

Hi,
Just use the ignore=y clause when importing ...
USER1@ORACLE10> create table a (id number primary key);
Table created.
USER1@ORACLE10> insert into a values (1);
1 row created.
USER1@ORACLE10> insert into a values (2);
1 row created.
USER1@ORACLE10> insert into a values (3);
1 row created.
USER1@ORACLE10> commit;
Commit complete.
USER1@ORACLE10> select * from a;
        ID
         1
         2
         3
USER1@ORACLE10> connect user2/pass
Connected.
USER2@ORACLE10> create table a (id number primary key);
Table created.
USER2@ORACLE10> insert into a values (1);
1 row created.
USER2@ORACLE10> commit;
Commit complete.
USER2@ORACLE10> select * from a;
        ID
         1
USER2@ORACLE10> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
C:\>exp user1/pass file=test tables=a
Export: Release 10.1.0.2.0 - Production on Wed Jan 16 12:59:40 2008
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
server uses WE8ISO8859P1 character set (possible charset conversion)
About to export specified tables via Conventional Path ...
. . exporting table A 3 rows exported
Export terminated successfully without warnings.
C:\>imp user2/pass file=test tables=a ignore=y
Import: Release 10.1.0.2.0 - Production on Wed Jan 16 13:00:55 2008
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V10.01.00 via conventional path
Warning: the objects were exported by USER1, not by you
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
import server uses WE8ISO8859P1 character set (possible charset conversion)
. importing USER1's objects into USER2
. . importing table                            "A"
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (USER2.SYS_C006313672) violated
Column 1 1 2 rows imported
Import terminated successfully with warnings.
C:\>sqlplus user2/pass
SQL*Plus: Release 10.1.0.2.0 - Production on Wed Jan 16 13:01:34 2008
Copyright (c) 1982, 2004, Oracle.  All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options
USER2@ORACLE10> select * from a;
        ID
         1
2
3Cheers
Legatti

Similar Messages

  • Make only the new row in a table editable and other rows display mode.

    Hiii all,
    I am working on the component GSWISET, there is a table view for substitutes, the requirement is to show all the rows in the table view in display mode. Whenever the user clicks the button (Add employee), a search popup triggers and the user selects an employee from that and it will come as a new row in the table view. Here I need to be able to make only the new row editable and all the other rows in display mode.
    Could you please suggest a way to achieve this. Thanks for your time..

    Hi,
    Try with  the code below in.htm page
    data: lv_displaymode  TYPE string.
      IF controller->view_group_context->is_view_in_display_mode( controller ) = abap_true.
        lv_displaymode = 'X'.
      ELSE.
        lv_displaymode = ' '.
      ENDIF.
    if lv_displaymode = 'X'.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"                    
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "ASSIGNMENTBLOCK"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    else.
    <chtmlb:tableExtension tableId = "Substitutes"
                           layout  = "FIXED" >
      <chtmlb:configTable actions               = "<%= controller->gt_button %>"
                          id                    = "Substitutes"
                          onRowSelection        = "select"
                          selectedRowIndex      = "<%= substitutes->SELECTED_INDEX %>"
                          selectedRowIndexTable = "<%= substitutes->SELECTION_TAB %>"
                          table                 = "//Substitutes/Table"
                          width                 = "100%"
                          selectionMode         = "<%= substitutes->selection_mode %>"
                          allRowsEditable       = "TRUE"
                          visibleFirstRow       = "<%= substitutes->VISIBLE_FIRST_ROW_INDEX %>"
                          usage                 = "EDITLIST"
                          headerText            = "<%= controller->gv_header_text %>" />
    </chtmlb:tableExtension>
    endif.
    Regards,
    Gangadhar.S
    Edited by: gangadhar rao on Dec 24, 2010 12:49 PM

  • How to apply the constraint ONLY to new rows

    Hi, Gurus:
       I have one question as follows:
       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns . However, since legacy system already has data for every table, and old data does not have value for the 2 new columns. If we apply the constraint, all of existing rows will raise exception. I wonder if there is possibility to apply the constraint ONLY to new rows to come in future.
    Thanks.
    Sam

       We need to migrate a legacy system to a new production server. I am required to add two columns to every table in order to record who updates the row most recently through triggers, and  I should apply not null constraint to the columns .
    The best suggestion I can give you is that you make sure management documents the name of the person that came up with that hair-brained requirement so they can be sufficiently punished in the future for the tremendous waste of human and database resources they caused for which they got virtually NOTHING in return.
    I have seen many systems over the past 25+years that have added columns such as those: CREATED_DATE, CREATED_BY, MODIFIED_DATE, MODIFIED_BY.
    I have yet to see even ONE system where that information is actually useful for any real purpose. Many systems have application/schema users and those users can modify the data. Also, any DBA can modify the data and many of them can connect as the schema owner to do that.
    Many tables also get updated by other applications or bulk load processes and those processes use generic connections that can NOT be tied back to any particular system.
    The net result is that those columns will be populated by user names that are utterly useless for any auditing purposes.
    If a user is allowed to modify a table they are allowed to modify a table. If you want to track that you should implement a proper security strategy using Oracle's AUDIT functionality.
    Cluttering up ALL, or even many, of your tables with such columns is a TERRIBLE idea. Worse is adding triggers that server no other purpose but capture useless infomation but, because they are PL/SQL cause performance impacts just aggravates the total impact.
    It is certainly appropriate to be concerned about the security and auditability of your important data. But adding columns and triggers such as those proposed is NOT the proper solution to achieve that security.
    Before your organization makes such an idiotic decision you should propose that the same steps be taken before adding that functionality that you should take before the addition of ANY MAJOR structural or application changes:
    1. document the actual requirement
    2. document and justify the business reasons for that requirement
    3. perform testing that shows the impact of that requirement on the production system
    4. determine the resource cost (people, storage, etc) of implementing that requirement
    5. demonstrate how that information will actually be used EFFECTIVELY for some business purpose
    As regards items #1 and #2 above the requirement should be stated in terms of the PROBLEM to be solved, not some preconceived notion of the solution that should be used.
    Your org should also talk to other orgs or other depts in your same org that have used your proposed solution and find out how useful it has been for them. If you do this research you will likely find that it hasn't met their needs at all.
    And in your own org there are likely some applications with tables that already have such columns. Has anyone there EVER used those columns and found them invaluable for identifying and resolving any actual problem?
    If you can't use them and their data for some important process why add them to begin with?
    IMHO it is a total waste of time and resources to add such columns to ALL of your tables. Any such approach to auditing or security should, at most, be limited to those tables with key data that needs to be protected and only then when you cannot implement the proper 'best practices' auditing.
    A migration is difficult enough without adding useless additional requirements like those. You have FAR more important things you can do with the resources you have available:
    1. Capture ALL DDL for the existing system into a version control system
    2. Train your developers on using the version control system
    3. Determining the proper configuration of the new server and system. It is almost a CERTAINTY that settings will get changed and performance will suffer even though you don't think you have changed anything at all.
    4. Validating that the data has been migrated successfully. That can involve extensive querying and comparison to make sure data has not been altered during the migration. The process of validating a SINGLE TABLE is more difficult if the table structures are not the same. And they won't be if you add two columns to every table; every single query you do will have to specify the columns by name in order to EXCLUDE your two new columns.
    5. Validating the performance of the app on the new system. There WILL BE problems where things don't work like they used to. You need to find those problems and fix them
    6. Capturing the proper statistics after the data has been migrated and all of the indexes have been rebuilt.
    7. Capturing the new execution plans to use a a baseline for when things go wrong in the future.
    If it is worth doing it is worth doing right.

  • Import only the rows of emp table from Test into emp table of Prod

    hi,
    Test Instance:
    =========
    I have a table "emp". I want to take export of it.
    Prod Instance:
    =========
    Table with name "emp" already exists.
    I want to import only the rows of emp table from Test Instance into emp table of Prod Instance.
    regards,
    charan

    Charan,
    Set the import command IGNORE=Y
    Importing into Existing Tables
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023662
    Regards,
    Hussein

  • How can I import *just* the new images in a folder?

    Is there anyway to import only the images within a folder that aren't already in the library? This seems to be the default behavior in Lightroom and makes really good sense. If I add an image to a folder without doing so in Aperture, I'd really like to just import that new version into the library.
    Thanks,
    -Dave

    Yes, I knew that I could do this, but I was hoping for an automated method as I suspect that I will screw things up if I rely on doing everything manually.
    -Dave

  • Only the top row of buttons works on the aluminun wireless keyboard

    After returning my first wireless keyboard for not pairing with my iMac (which has all the right tech specs) I exchanged it for a new one. Initially, I was able to type letters and numbers only and many of the keys were not doing the task they were supposed to--the F12 keys ejected CDs and the eject button did nothing. I went to the Apple icon and downloaded all of the new updates that showed up, restarted my computer and then suddenly, the eject button worked! But, when I tried to type letters and numbers, nothing happened. My computer recognizes it and the top row of buttons works just fine.

    the same has happend to me, it's a new wireless keyboard, and from the moment i paired them only the to row (f1,f2....eject) buttons are working.
    what am i to do

  • Importing only the metadata

    Hi,
    I have a full database dump and I would like to import only the metadata, i.e., only the objects structure.
    My database is an Oracle 8i versioned. I used the following:
    imp system file= log= full=y rows=n
    kindly let me know if I am wrong or is there any other way to do this.
    With the above statement only the schemas are created but there are no objects at all.

    rp0428 wrote:
    Did you specify TABLES=* to import all tables?import operates in 1 of 3 modes
    a) FULL=Y
    b) OWNER=<schema_name>
    c) TABLES=
    & they are mutually exclusive

  • How to get only the changed rows in h:dataTable

    Hi,
    I am very new in jsf technology.
    For our application, I need to process only the changed rows in the jsf datatable in managed bean.
    User may also enter new rows.We have to consider this also.
    Pls post ur suggession as soon as possible.This is urgent.This will be best if someone can post me some code snippets.
    Thanks
    -S

    As klejs said, set the valueChangeListener attribute to each of the input fields. Have a method in your backing bean which would
    1) get the index from the component id
    2) get the object and the above index from ArrayList
    3) check if the old Value is different from the new value. If yes, set some boolean flag in that object to true indicating that the row is modified.
    Sample code below. Please feel free to add checks if you need.
         public void updateDirtyFlag(ValueChangeEvent valueChangeEvent){
             if(valueChangeEvent.getOldValue()==null && valueChangeEvent.getNewValue()==null){
                     return;
             if(valueChangeEvent.getComponent().getId()==null){
                 return;
          //Extract the index from the component id in the getId method
             int idVal=getId(valueChangeEvent.getComponent().getClientId(FacesContext.getCurrentInstance()));
             ArrayList dataList=getData(); // data from session or request scope
              if((valueChangeEvent.getOldValue()==null && valueChangeEvent.getNewValue()!=null)        
                     || (valueChangeEvent.getOldValue()!=null && valueChangeEvent.getNewValue()==null)){
                 if(dataList!=null && idVal<dataList.size() && idVal>-1){
                     YourBaseValueObject pojo=(YourBaseValueObject)dataList.get(idVal);
                     pojo.setUpdateFlag(true);
             else if(valueChangeEvent.getOldValue()!=null && valueChangeEvent.getNewValue()!=null && !valueChangeEvent.getOldValue().equals(valueChangeEvent.getNewValue())){
                 if(dataList!=null && idVal<dataList.size() && idVal>-1){
                     YourBaseValueObject pojo=(YourBaseValueObject)dataList.get(idVal);
                     pojo.setUpdateFlag(true);
         }HTH.
    Karthik

  • XML: import only the body element...

    I need import only the body element...
    var myXMLFile=File.openDialog("Choose XML.......");
    myDoc.importXML(File(myXMLFile.body));
    But not work...!!!
    It this possible?

    It this possible?
    Not like that!
    What you've written doesn't make much sense:
    var myXMLFile=File.openDialog("Choose XML.......");
    myDoc.importXML(File(myXMLFile.body));
    In this code, myXMLFile is a File object. File objects do not have .body properties, so myXMLFile.body is not valid.
    And even if a File object did have a .body property, it would presumably be some sort of XML content inside the File. But the File() constructor takes a string argument that is a filename. So File(myXMLFile.body) wouldn't work either!
    I think you should take a step back and make sure you understand the basics before you try to put them together like this.
    Since the importXML() method only takes a file, a solution is to read the XML file, pull out the <body/> element, write it to another file,and then call importXML() on the new file.
    Alternatively, you can create an XSLT transformation and set doc.XMLImportPreferences to mandate its use. If you're not familiar with XSLT, learning it may not be appropraite for this task.
    But perhaps your requirements are overly restrictive -- why can't you import the whole file and then only instruct InDesign to deal with the body element?

  • How do I transfer my play lists from one pc to another? I can't find import on the new version.

    How do I transfer my play lists from one pc to another? I can't find import on the new version.

    Holtey wrote:
    Not an option.
    Onlly have turn on home sharing or get artwork
    Do ou have the iTunes menus showing across the top of the iTunes window?
    ctrl B

  • HT204350 Hey, migration from an old mac late 2008 aluminium to a brand new mac book air. Only the new one has firewire. Transmissiom via wifi estimates ~50h. Is there a faster Way to sync? Tanks in advance

    Hey, migration from an old mac late 2008 aluminium to a brand new mac book air. Only the new one has firewire. Transmissiom via wifi estimates ~50h. Is there a faster Way to sync? Tanks in advance

    I'll venture that your problem here is that you're using two very different versions of Mac OS X.  The USB adapter has been useful to me when making big downloads or while using other networks, but it might not be your case. 
    Here's what I would advise, though it may be less than stellar:  Copy the files you need into folders and move them through a USB flash drive or using that external hard drive of yours. (Could the format be the reason your MBA can't see it?). Some stuff like calendars and contacts can be exported too. At least in Lion, I haven't used Tiger in a while. 
    Good luck.

  • Mac OSX, 10.7.5, LR 5.6  After creating a new folder in the Destination section and importing images, the new folder name appears as 2010, no matter what name I give it.  Why is it doing this?

    Mac OSX, 10.7.5, LR 5.6  After creating a new folder in the Destination section and importing images, the new folder name appears as 2010, no matter what name I give it.  Why is it doing this?

    I am experiencing Mavericks failing to copy subdirectories from usb sticks, I am backing up game saves from a console. Both sticks I use are fine, same permissions of course since the console wrote the files. Sometimes it copies, sometimes it doesn't. It seems to be related to the mounting process.
    Thank God Apple hasn't (yet) broken bash.

  • Refreshing only the single row of  ADF Table

    Hi All,
    I have a webcenter application where the ADF Applications has been deployed.Now the Data is coming onto the ADF Tables from a webservice.In that particular table i need to refresh only the single row(whichever selected by the user to edit ) or even a particular field with the updated values as well as need to validate and to create a message box saying about the errors if the validation goes wrong.
    Please suggest!!

    Hi,
    if "updated value" mean that the value got changed on the middle tier (not the browser client) then the update requires the table to be partially refreshed. If the user edits a row and in this row has dependent fields, then this can be achieved by partially refreshing the column. Note that ADF Faces tables don't refresh just one cell
    Frank

  • How do i get my contacts back? they are backed up by i cloud but when I "MERGE" only the new ones are there and not the old ones

    how do i get my contacts back? they are backed up by i cloud but when I "MERGE" only the new ones are there and not the old ones

    Hi sfuentes,
    You need to check iCloud to see if they are actually there. Go to iCloud.com and sign in and then look at your Contacts there to see if the old ones are still showing on iCloud.
    If they are not, then you can either re-enter them while you are on iCloud.com, or you can restore your device from the backup where you saved them:
    https://support.apple.com/kb/ph12521
    Cheers,
    GB

  • Display only the result rows only by using condition or any other way

    Hello Everybody,
    I've a web report where I want to diplay ony the result rows and don't want to display the detail rows at all. I could hide the detail rows but these rows still appear without any value in the key figure fields.
    I tried to revove the characteristic field from the drilldown but it doesn't show the report correctly. Then I tried to write a condition to filter the detail rows but this condition doesn't apply to the result rows so this effort also didn't work for me.
    Is there anyway we can display the report with only the result rows ? I've already tried to find out a solution on SDN but couldn't get the solution eventhough I found many posts on this kind of requirement.
    Any help would be greatly appreciated.
    Thanks
    Alok

    Please explain when you say
    "I tried to remove the characteristic field from the drill down but it doesn't show the report correctly"
    What is problem there? What result do you get. If possible please provide  details of columns layout and few numbers

Maybe you are looking for