Exp/imp and storage clause

Is it possible to make an export of the database with the exp tool, but without the storage clause for tables and indexes?
My develop database is 2GB big, and when i make an export without data and import it in a clean production environment without data, the datafiles are also 2GB big.
The export parameter compress=Y/N doesn't matter.
Thanks

gert-jan, your post is unclear on by 2G big you mean the physical datafile size or the amount of space allocated within the tablespaces?
If you are allowing the import to create the tablespaces then they are going to have the same size as defined in test.
The compress=y/n option should make a difference in that the default compress=y would cause a larger value be written to the export file for the initial extent.
But an important question is how were the import database target tablespaces defined: dictionary or locally managed, uniform or auto-allocate.
If the tables were created with too large of allocations I would generate alter table move commands with storage clauses to resize the objects on the target. Then I would rebuild the indexes with storage clauses to do the same. You can change the initial extent size on a move/rebuild operation.
The version of Oracle is always important because Oracle has been known to change feature behavior and parameter default values with release changes.
HTH -- Mark D Powell --

Similar Messages

  • [SOLVED] Create table and storage clause

    Hi, I create a table whit lob ad so, I set some LOB storage clause:
    CREATE TABLE W2_T_MESSAGE_NWSL (
    KEY NUMBER,
    T_MESSAGE CLOB DEFAULT EMPTY_CLOB(),
    T_TEXTMESSAGE CLOB DEFAULT EMPTY_CLOB(),
    T_FOOTER CLOB DEFAULT EMPTY_CLOB())
    LOB (T_MESSAGE)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW),
    LOB (T_TEXTMESSAGE)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW),
    LOB (T_FOOTER)
    STORE AS (TABLESPACE LOBDATA CACHE READS RETENTION ENABLE STORAGE IN ROW);I need to export this table and do an import on a different instance.
    I know for sure that the tablespace LOBDATA exists on both database but I can't say the same for the user default tablespace.
    The problem is that when I import this table, the statement fail because the default tablespace of the user hasn't the same name of the tablespace where the table was exported.
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'USERWNSTARTUP' does not exist
    This because the create table generated by the export has this storage clause:
    PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(
    INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE USERWNSTARTUP LOGGING NOCOMPRESS LOB (B_LOGO) STORE AS (TABLESPACE "LOBDATA" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 CACHE READS STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1)
    On other tables, where I havent defined any storage clause all works fine.
    Is there a way to resolve this problem?
    Thanks
    Regards

    if someone is interested I've found this on the official import oracle documentation:
    if the tablespace no longer exists or the user does not have the necessary quota, the system uses the default tablespace for that user as long as the table is unpartitioned, contains no LOB or VARRAY columns, is not a type table, and is not an index-only table with an overflow segment.In my case I've a LOB column, so tablespace information would be exporterd. I've done a trace of the import and I can confirm that on table without lob, varray etc.. the create table statement hasn't the tablespace specification.

  • 2 questions - exp/imp and coltype

    I have two questions - both unrelated : (Oracle 9.2.0.5 running on AIX 5.3)
    1. I did a schema export in database DB1 of a user USR1 that has a bunch of tables with data. Some of the tables are in tablespace TS1 whereas some are in TS2. Export is successful.
    Now, I want to use this .dmp file to import the objects into another oracle database DB2. Having created the user USR1 in DB2, I want to import all the objects into USR1. But DB2 has only one tablespace TS1.
    So, how do I successfully import all the objects into TS1 (even though some of them existed in TS2 of the source database ) ??
    2. Based on the data in a column of a table, I want to determine if the value contains alphabets or if it is numeric only. How do I do this ?
    For example
    SELECT ENAME FROM EMP;
    SCOTT
    BRIAN2
    MATHEWS
    GEORGE3
    5555
    I am looking for an output something like :
    SCOTT ALPHA
    BRAIN2 ALPHANUMERIC
    MATHEWS ALPHA
    GEORGE3 ALPHANUMERIC
    5555 NUMERIC

    Hi,
    1) No problem, the dump will be imported into default's target user
    2) Maybe this code below help you a little ...
    SQL> create table emp (ename varchar2(20));
    Table created.
    SQL> insert into emp values ('SCOTT');
    1 row created.
    SQL> insert into emp values ('BRIAN2');
    1 row created.
    SQL> insert into emp values ('MATHEWS');
    1 row created.
    SQL> insert into emp values ('GEORGE3');
    1 row created.
    SQL> insert into emp values ('5555');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> SELECT ENAME,NVL2(LENGTH(TRIM(TRANSLATE(ENAME,'+-.0123456789',' '))),'ALPHA','NUMERIC') FROM EMP;
    ENAME                NVL2(LE
    SCOTT                ALPHA
    BRIAN2               ALPHA
    MATHEWS              ALPHA
    GEORGE3              ALPHA
    5555                 NUMERIC
    SQL>Cheers

  • Running OMBPlus and EXP/IMP in mixed version environment

    OWB Mixed Environment Guru's
    Current environment:
    OWB Client: 10.1.0.2.0 on Windows XP Professional
    OWB Server side: 10.1.0.2.0 on UNIX (AIX 5.2)
    Repository: Oracle 9.2.0.4 on UNIX (AIX 5.2)
    UNIX Listener: 9.2.0.4 on UNIX (AIX 5.2)
    Runtime Repository: Oracle 9.2.0.4 on UNIX (AIX 5.2)
    I call this a mixed environment since my OWB stuff is 10g and my database stuff is 9.2.
    Issues:
    1- I can't get the command line exp.sh script to connect to the repository and returns the famous 'ORA-12154, TNS:listener does not currently know of service requested in connect descriptor'. It looks like the 'owbsetenv.sh' script is changing the value of $ORACLE_HOME to point to the 10g areas. Could that be then causing the system to look for a 10g LISTENER which doesn't exist since all my databases are 9.2.0.4???
    2- I have the same issue trying to run OMBPlus.sh.
    I am ultimately trying to set up a promotion process using the UNIX command line programs (exp/imp and OMBPlus) to get objects from the TEST environment into the PRODUCTION environment which is a separate repository and target schema on a different machine.
    Any advice on how to successfully operate in this 'mixed' environment is most welcomed.
    Many thanks!
    Gary

    Well it looks like I did it again!
    Total brain fart.
    The problem turned out that I wasn't specifying the entire SERVICE_NAME for the repository database. I had been leaving off the domain information. Must be a habit from not having to use it in the TNSNAMES.ORA files.
    I was able to compelte my test export and connect to OMBPLUS and will now try my test import.
    Sorry to clutter the forum but if it helps anyone else with the same affliction I seem to have frequently, I guess that's a small reward.
    Until next time.
    Gary

  • Exp/Imp alternatives for large amounts of data (30GB)

    Hi,
    I've come into a new role where various test database are to be 'refreshed' each night with cleansed copies of production data. They have been using the Imp/Exp utilities with 10g R2. The export process is ok, but what's killing us is the time it takes to transfer..unzip...and import 32GB .dmp files. I'm looking for suggestions on what we can do to reduce these times. Currently the import takes 4 to 5 hours.
    I haven't used datapump, but I've heard it doesn't offer much benefit when it comes to saving time over the old imp/exp utilities. Are 'Transportable Tablespaces' the next logical solution? I've been reading up on them and could start prototyping/testing the process next week. What else is in Oracle's toolbox I should be considering?
    Thanks
    brian

    Hi,
    I haven't used datapump, but I've heard it doesn't offer much benefit when it comes to saving time over the old imp/exp utilitiesDatapump will be faster for a couple of reasons. It uses direct path to unload the data. DataPump also supports parallel processes, so while one process is exporting metadata, the other processes can be exporting the data. In 11, you can also compress the dumpfiles as you are exporting. (Both data and metadata compression is available in 11, I think metadata compression is available in 10.2). This will remove your zip step.
    As far as transportable tablespace, yes, this is an option. There are some requirements, but if it works for you, all you will be exporting will be the metadata and no data. The data is copied from the source to the target by way of datafiles. One of the biggest requirements is that the tablespaces need to be read only while the export job is running. This is true for both exp/imp and expdp/impdp.

  • Help with exp schema and related objects

    I need to export a schema from one database to another. I must also be able to export the tablespaces, roles, constraints, etc that are associated with it that aren't necessarily part of the schema. Is there an easy way to do this? I had already tried simply doing a schema exp/imp and it threw up a bunch of errors mostly grants which isn't that big of a deal but some of the tables were not created due to tablespaces being missing.

    exp system/manager file=exp.dmp log=exp.log full=y at the source database.
    imp system/manager file=exp.dmp log=imp_show.log full=y show=y - create the log file without importing the data
    edit the imp_show.log and extract the statements that are needed to re-create users,roles,alter user and grants.
    Pre-create the tablespaces using SQL*Plus in the target database.
    execute the modified imp_show.log(All DDl's)
    imp system/manager file=exp.dmp log=imp.log fromuser=A touser=B
    Re-compile all the Invalid Objects.
    HTH
    -Anantha

  • IMP - EXP and storage parameters

    Hi All,
    I am planning to import few tables from one database to another database using our good old import-export (even when I am on 10g).
    Tables which I am importing do not exist in the target database. So, when I create them from the export dump, I think they will be created "with the same storage parameters (i.e. initial extent, next etc etc) as the source database". If I want import tables to take up the storage parameters of the target database/tablespace instead of the source, what is the way ??
    Thanks in advance

    Sabdar is right. Pre-defining the objects using the desired storage clause is the best way to do this.
    If using locally managed tablespaces in the target database the tablespace parameters will override the next extent and pct_increase information on import but the initial extent setting will influence how many extents are allocated.
    I suggest in either case: dictionary or locally managed target tablespaces that the export be made using compress=n. This will give you the best control over how much space the objects take on import.
    HTH -- Mark D Powell --

  • How to exp/imp both diff character set tables between in DB1 and DB2?

    In the Solaris 2.7 ,the oracle 8i DB1 has NLS_CHARACTERSET
    ZHS16CGB231280 and NLS_NCHAR_CHARACTERSET ZHS16CGB231280
    character set.
    In other linux7.2 system ,the oracle 8i DB2 is install into the
    NLS_NCHAR_CHARACTERSET US7ASCII and NLS_CHARACTERSET US7ASCII
    character set.
    The tables contents of DB1 have some chinese. I want to exp/imp
    tables of DB1 into DB2 . But the chinese can't correct display
    in the SQLWheet tools. How do the Exp/Imp operation ? ples help
    me . thanks .

    The supported way to store GB231280-encoded characters is using a ZHS16CGB231280 database or a database created using a superset of GB231280 ,such as UTF8 .Can you not upgrade your target database from US7ASCII to ZHS16CGB231280 ?
    With US7ASCII and NLS_LANG set to US7ASCII , you are using the garbage in garbage out (GIGO) approach. This may seem to work but there are many hidden problems :-
    1. Invalid SQL String Function behaviours - LENGTH ( ) , SUBSTR ( ) , INSTR ( )
    2. Data can be corrupted when data is loaded into another database. e.g. EXP / IMP , Dblinks
    3. Communication with other clients will generate incorrect results. e.g. other Oracle products - Oracle Text, Forms. , Java , HTML etc.
    4. Linguistic sorts not available
    5. Query using the standard WHERE clause may return incorrect results ..
    6. Extra coding overhead in handling character conversions manually.
    I recommend you to check out the FAQ and the DB Character set migration guide on the Globalization Support forum on OTN.
    Nat.

  • Full database exp/imp  between RAC  and single database

    Hi Experts,
    we have a RAC database oracle 10GR2 with 4 node in linux. i try to duplicate rac database into single instance window database.
    there are same version both database. during importing, I need to create 4 undo tablespace to keep imp processing.
    How to keep one undo tablespace in single instance database?
    any experience of exp/imp RAC database into single instance database to share with me?
    Thanks
    Jim
    Edited by: user589812 on Nov 13, 2009 10:35 AM

    JIm,
    I also want to know can we add the exclude=tablespace on the impdp command for full database exp/imp?You can't use exclude=tablespace on exp/imp. It is for datapump expdp/impdp only.
    I am very insteresting in your recommadition.
    But for a full database impdp, how to exclude a table during full database imp? May I have a example for this case?
    I used a expdp for full database exp. but I got a exp error in expdp log as ORA-31679: Table data object "SALE"."TOAD_PLAN_TABLE" has long columns, and longs can not >be loaded/unloaded using a network linkHaving long columns in a table means that it can't be exported/imported over a network link. To exclude this, you can use the exclude expression:
    expdp user/password exclude=TABLE:"= 'SALES'" ...
    This will exclude all tables named sales. If you have that table in schema scott and then in schema blake, it will exclude both of them. The error that you are getting is not a fatal error, but that table will not be exported/imported.
    the final message as
    Master table "SYSTEM"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
    Dump file set for SYSTEM.SYS_EXPORT_FULL_01 is:
    F:\ORACLEBACKUP\SALEFULL091113.DMP
    Job "SYSTEM"."SYS_EXPORT_FULL_01" completed with 1 error(s) at 16:50:26Yes, the fact that it did not export one table does not make the job fail, it will continue on exporting all other objects.
    . I drop database that gerenated a expdp dump file.
    and recreate blank database and then impdp again.
    But I got lots of error as
    ORA-39151: Table "SYSMAN"."MGMT_ARU_OUI_COMPONENTS" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
    ORA-39151: Table "SYSMAN"."MGMT_BUG_ADVISORY" exists. All dependent metadata and data will be skipped due to table_exists_action of skip
    ......ORA-31684: Object type TYPE_BODY:"SYSMAN"."MGMT_THRESHOLD" already exists
    ORA-39111: Dependent object type TRIGGER:"SYSMAN"."SEV_ANNOTATION_INSERT_TR" skipped, base object type VIEW:"SYSMAN"."MGMT_SEVERITY_ANNOTATION" >already exists
    and last line as
    Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 2581 error(s) at 11:54:57Yes, even though you think you have an empty database, if you have installed any apps or anything, it may create tables that could exist in your dumpfile. If you know that you want the tables from the dumpfile and not the existing ones in the database, then you can use this on the impdp command:
    impdp user/password table_exists_action=replace ...
    If a table that is being imported exists, DataPump will detect this, drop the table, then create the table. Then all of the dependent objects will be created. If you don't then the table and all of it's dependent objects will be skipped, (which is the default).
    There are 4 options with table_exists_action
    replace - I described above
    skip - default, means skip the table and dependent objects like indexes, index statistics, table statistics, etc
    append - keep the existing table and append the data to it, but skip dependent objects
    truncate - truncate the existing table and add the data from the dumpfile, but skip dependent objects.
    Hope this helps.
    Dean

  • Imp and Exp Command

    Hi,
    Pls explain me the concept of Imp/Exp command and the parameters assocoiated with it?If u can tell me online practicals for Import/Export command?
    Regards
    sudhir

    At 8:03, you "wanna learn" about tablespaces and datafiles.
    At 8:11 you want the concept of Imp/Exp explained to you.
    At 8:10 you "wanna learn" the concept of Roll Back Segmenst [sic]
    And at 8:12 you "wanna learn" all about SQL*Loader
    Not bad for nine minutes of complete thoughtlessness, I suppose.
    If you "wanna learn" all about Oracle, download the software, install it, start playing with it, and come back with some serious questions that show a modicum of thought, effort, persistence and care. Paying some attention to the usual rules of grammar and spelling might be an idea, too.
    You'll find installations documented at http://www.dizwell.com/prod/node/695#installation, and then you can work your way through some concepts at http://www.dizwell.com/prod/node/263 and then you can start doing some basic fiddling at http://www.dizwell.com/prod/node/695#basics and once you've worked your way through that lot, you should be in a position to make sensible use of the stuff over at http://tahiti.oracle.com.
    And after you've had a good read of the official Concepts book there, then you can come back here to ask specific questions and reasonably expect to get meaningful replies.

  • Info about imp and exp

    Hi everyone
    I need you to test If the work I will do is right or not .
    in general:-
    I want to take full export from database 10g
    and I want to import it in oracle database 7.3.2
    in details:-
    I will execute catexp7 on database 10g and after that I will take full export
    and import the exported file on database 7.3.2.
    If it is not right please could you correct me.
    bye.

    Hi,
    Try with exp/imp.Are you facing any problem .Study the below link:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch01.htm
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/

  • Error while using REMAP_TABLE and WHERE clause  together in IMPDP

    I am trying to move some records from a very large table to another small table.
    I am facing trouble while using REMAP_TABLE and WHERE clause together in IMPDP.
    Problem is data filter is not getting applied and all records are getting imported.
    here is how I have simulated this. please advice.
    CREATE TABLE TSHARRHB.TMP1
      A  NUMBER,
      B  NUMBER
    begin
    Insert into TSHARRHB.TMP1
       (A, B)
    Values
       (1, 1);
    Insert into TSHARRHB.TMP1
       (A, B)
    Values
       (2, 2);
    COMMIT;
    end;
    expdp system/password TABLES=tsharrhb.TMP1 DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp REUSE_DUMPFILES=YES LOGFILE=EXP.log PARALLEL=8
    impdp system/password DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY='TSHARRHB.TMP1:"WHERE TMP1.A = 2"'  REMAP_TABLE=TSHARRHB.TMP1:TMP3 CONTENT=DATA_ONLY
    Import: Release 11.2.0.1.0 - Production on Fri Dec 13 05:13:30 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/********@GRD6.RBSG DIRECTORY=GRDP_EXP_DIR DUMPFILE=TMP1.dmp LOGFILE=SSD_93_TABLES_FULL_EXP.log PARALLEL=8 QUERY=TSHARRHB.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=TSHARRHB.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "TSHARRHB"."TMP3"                           5.421 KB       2 rows
    Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at 05:13:33
    here I am expecting only 1 record to get imported but both the records are getting imported. please advice.

    The strange thing compared to your output is that I get an error when I have table prefix in the query block:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE TMP1.A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    ORA-31693: Table data object "SYSADM"."TMP3" failed to load/unload and is being skipped due to error:
    ORA-38500: Unsupported operation: Oracle XML DB not present
    Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 1 error(s) at Fri Dec 13 10:39:11 2013 elapsed 0 00:00:03
    And if I remove it, it works:
    Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** DUMPFILE=TMP1.dmp LOGFILE=imp.log PARALLEL=8 QUERY=SYSADM.TMP1:"WHERE A = 2" REMAP_TABLE=SYSADM.TMP1:TMP3 CONTENT=DATA_ONLY
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    . . imported "SYSADM"."TMP3"                             5.406 KB       1 out of 2 rows
    Job "SYSTEM"."SYS_IMPORT_FULL_01" successfully completed at Fri Dec 13 10:36:50 2013 elapsed 0 00:00:01
    Nicolas.
    PS: as you can see, I'm on 11.2.0.4, I do not have 11.2.0.1 that you seem to use.

  • Need help for full db exp-imp

    Hi,
    My database is having undo segment corruption.I have considered and tried a lot of things to come out of the situation,but didn't get any +ve result. So I have decided to take a full database export,rename the database,create a new database on the same system and import the full database in the new database.Will you plz tell me the steps to do this(full db import)? Plz include a wise syntax for full db exp-imp.
    Thanks a lot

    If your only identified problem was sudden undo corruption to an online instance and you followed the steps referenced on the Burleson site (switch to manual undo management, create a new undo tablespace, drop the old undo tablespace, and switch back to automatic undo management) and then the very next day encountered undo corruption again, I would recommend two simultaneous courses of action:
    1) Get the hardware analyzed, this could be a signal of hard drive or controller problems.
    2) Scour metalink for any bug references that may be related (or just go ahead and open an iTar).
    If you persist in importing to create the database back on this same system and if you must use the same storage, I would at least try to get the file system or volume that the corruption was on taken offline and recreated.
    Just an alternate view of things ... good luck!

  • How to upgrade a DB using EXP/IMP

    Guys
    I need to upgrade a small DB using IMP and EXP from 8i to 9i. Can you guys help me with the steps. Perhaps I was using the wrong search words, but I found no satisfying answers on google.
    1. Recreate the target database TRGT with the correct tablespace definitions.
    I need to query from dba_datafiles, dba_tablespaces, dba_temp_files?
    2. EXPort the source database SRC
    3. IMPort the dump file
    I am little unsure of step #1. Can you help me with the details pls?
    TIA

    . Recreate the target database TRGT with the correct tablespace definitions.I need to query from dba_datafiles, dba_tablespaces, dba_temp_files?
    Before starting the import,u need to create a fresh database on new 9i server.and create new tablespaces with same name that was present in 8i.after it u can start ur import with using ignore=y,otherwise it says following tablespace is already exists.
    **import also automatically create the required tablespaces but if u want to change the storage attributes or location of dbf files ,its better that u create it manually before starting imp.
    Kuljeet

  • Exp/imp related problem

    Hi all,
    I have one problem in Oracle 9.2.0.8 onRHEL4. Iwant to use exp/imp to update one table from one server to another.
    Suppose I have one table abc on A server and it is having around 1 million records and another B server is also having the same no. of records and some of the record have been changed to A server and i also want to imp the same record to another server B.Is there any paramneter in IMP.
    Please suggest me.

    Hi,
    Kamran Agayev A. wrote:
    user00726 wrote:
    but how would i know which table has been updated or modifiedUsing MERGE funtion, you'll merge two tables. This command will updated changed rows and insert non-inserted rows to the second table and make it as the same as the first tableSQL> create table azar(pid number,sales number,status varchar2(20));
    Table created.
    SQL> create table azar01(pid number,sales number,status varchar2(20));
    Table created.
    SQL> insert into azar01 values(1,12,'CURR');
    1 row created.
    SQL> insert into azar01 values(2,13,'NEW');
    1 row created.
    SQL> insert into azar01 values(3,15,'CURR');
    1 row created.
    SQL> insert into azar values(2,24,'CURR');
    1 row created.
    SQL> insert into azar values(3,0,'OBS');
    1 row created.
    SQL> insert into azar values(4,42,'CURR');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from azar01;
    PID SALES STATUS
    1 12 CURR
    2 13 NEW
    3 15 CURR
    SQL> select * from azar;
    PID SALES STATUS
    2 24 CURR
    3 0 OBS
    4 42 CURR
    SQL> merge into azar01 a using azar b on (a.pid=b.pid) when matched
    2 then update set a.sales=a.sales + b.sales, a.status=b.status
    3 delete where a.status='OBS'
    4 when not matched
    5 then insert values(b.pid,b.sales,'NEW');
    3 rows merged.
    SQL> select * from azar01;
    PID SALES STATUS
    1 12 CURR
    2 37 CURR
    4 42 NEW
    Hello Sir, is this correct?
    Regards
    S.Azar
    DBA

Maybe you are looking for

  • Itunes 9.0.3 64bit still not compatible with Windows 7.

    Have downloaded 9.0.3 in the hope that it will have fixed the ongoing issue of my ipod classic (80gb) still not being recognised, I am still unale to sync due to my ipod classic not being recognised! It seems that the 64 bit version actually runs as

  • Lightroom 2 will not launch in 64 bit mode on mac

    I have a mac pro running leopard 10.5.4 and 10gb of ram. I have been running the lightroom 2 beta since it came out and am now using the trial of the final shipping version. I don't think I have ever been able to get lightroom to launch in 64 bit. As

  • Illustrator files won't open on shared drive.

    Just upgraded to Mac OS to Yosemite (10.10) and can no longer open files on a shared drive within Illustrator or other Creative Cloud apps.  However, if those files are transferred to desktop I can open them.  These exact same files were opening befo

  • Mac Mini unable to write to DVD-Rs

    Hi, I was wondering if anyone can help. I am trying to write to a DVD-R (I have tried several makes) but the drive does not seem to recognise the disk and spits it out. I am able to write to CD-R & CD-RW but no luck with DVD-Rs. Super drive is MATSHI

  • Key Detection

    Hi, I'm trying to figure out what the key of a piano loop is.  A while back, I was able to do this with Audition 3 but can't remember how I did it.  I'm using Audition CS6 now, so any help on finding out what the key of a piano loop (or violin/choir/