Export/Import with where condition

DearAll,
I am facing a problem in the delete of a huge table that take 3 hours
DELETE FROM HST HST
WHERE JV_TYPE <> 999
and ( HST.VALUE_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY')
AND HST.TRANS_DATE <= TO_DATE ('31/12/2010','DD/MM/YYYY'))
what i am trying to do is to export the HST table and import it into another table
but what i need to do is to have a dump with where condition including only the needed records in the table not deleted in the DML above as well as the indexes, triggers.
Thanks

If I try the following:
CONN / AS SYSDBA
CREATE OR REPLACE DIRECTORY dpump_dir1 AS '/folder/';
GRANT READ, WRITE ON DIRECTORY dpump_dir1 TO bokprod;
expdp bokprod/bokprod@uat TABLES=HST PARFILE=hst_query.par
In the parfile:
QUERY=hst:"WHERE JV_TYPE <>999 and ( HST.VALUE_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY') AND HST.TRANS_DATE > TO_DATE ('31/12/2010','DD/MM/YYYY'))"
DUMPFILE=exp.dmp
DIRECTORY=dpump_dir1
LOGFILE=exp.log
impdp bokprod/bokprod@uat DIRECTORY=dpump_dir1 DUMPFILE=exp.dmp
TABLES=bokprod.hst REMAP_TABLE=bokprod.hst:hst_imported
My question is:
1- the parameter file, if i put it in the dpump_dir1 directory, is it read by the expdp command?
2- the hst_imported table created by the remap_table command , is it created with the indexes and triggers already existant on hst table?
Appreciate yoyr help Dears

Similar Messages

  • Export data with where condition

    Hello,
    I am doing an export using exp utility in oracle.
    exp fas/fas@fdbl file=aud log=aud.log parfile=exp
    Contents of parfile - exp
    compress=n
    indexes=n
    constraints=n
    grants=n
    triggers=n
    statistics=none
    consistent=y
    query=\"where org_grp_i=33 \"
    I am getting error when i include query = \"where org_grp_i=33 \". Without giving this condition the export is doing fine, its successful. how do i give this where condition in the parfile since i want to export lots of tables with this same condition. org_grp_i is common in all the tables.
    Thanks

    1. create directory ----
    sql> conn / as sysdba
    sql>create directory "data" as 'c:\';
    2. grant read, write privs. to exp or imp users.
    sql>grant read , write on directory data to scott;
    sql>grant read , write on directory data to tester;
    3.conn imp or exp user
    sql>conn scott/tiger
    SQL> host expdp scott/tiger directory=data dumpfile=eg.dmp tables=avgsal
    Export: Release 10.1.0.2.0 - Production on Wednesday, 25 October, 2006 19:14
    Copyright (c) 2003, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Starting "SCOTT"."SYS_EXPORT_TABLE_01":  scott/******** directory=data dumpfile=
    eg.dmp tables=avgsal
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TBL_TABLE_DATA/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 64 KB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    . . exported "SCOTT"."AVGSAL"                            5.312 KB       5 rows
    Master table "SCOTT"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
    Dump file set for SCOTT.SYS_EXPORT_TABLE_01 is:
      C:\EG.DMP
    Job "SCOTT"."SYS_EXPORT_TABLE_01" successfully completed at 19:15
    SQL> drop table avgsal purge;
    Table dropped.
    SQL> host impdp tester/tester directory=data dumpfile=eg.dmp
    Import: Release 10.1.0.2.0 - Production on Wednesday, 25 October, 2006 19:16
    Copyright (c) 2003, Oracle.  All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Master table "TESTER"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
    Starting "TESTER"."SYS_IMPORT_FULL_01":  tester/******** directory=data dumpfile
    =eg.dmp
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/TBL_TABLE_DATA/TABLE/TABLE_DATA
    . . imported "SCOTT"."AVGSAL"                            5.312 KB       5 rows
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    Job "TESTER"."SYS_IMPORT_FULL_01" successfully completed at 19:16
    SQL>
    note : cmd>impdp help=y
    cmd> expdp help=y
    see doc. for more info
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14215/toc.htm
    Message was edited by:
    user52

  • Export (expdp) with where clause

    Hello Gurus,
    I am trying to export with where clause. I am getting below error.
    Here is my export command.
    expdp "'/ as sysdba'" tables = USER1.TABLE1 directory=DATA_PUMP dumpfile=TABLE1.dmp logfile=TABLE1.log query= “USER1.TABLE1:where auditdate>'01-JAN-10'” Here is error
    [keeth]DB1 /oracle/data_15/db1> DATA_PUMP dumpfile=TABLE1.dmp logfile=TABLE1.log query= USER1.TABLE1:where auditdate>'01-JAN-10'                    <
    Export: Release 11.2.0.3.0 - Production on Tue Mar 26 03:03:26 2013
    Copyright (c) 1982, 2011, 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, OLAP, Data Mining and Real Application Testing options
    Starting "SYS"."SYS_EXPORT_TABLE_03":  "/******** AS SYSDBA" tables=USER1.TABLE1 directory=DATA_PUMP dumpfile=TABLE1.dmp logfile=TABLE1.log query= USER1.TABLE1:where auditdate
    Estimate in progress using BLOCKS method...
    Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
    Total estimation using BLOCKS method: 386 MB
    Processing object type TABLE_EXPORT/TABLE/TABLE
    Processing object type TABLE_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
    Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
    Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
    Processing object type TABLE_EXPORT/TABLE/TRIGGER
    Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-31693: Table data object "USER1"."TABLE1" failed to load/unload and is being skipped due to error:
    ORA-00933: SQL command not properly ended
    Master table "SYS"."SYS_EXPORT_TABLE_03" successfully loaded/unloaded
    Dump file set for SYS.SYS_EXPORT_TABLE_03 is:
      /oracle/data_15/db1/TABLE1.dmp
    Job "SYS"."SYS_EXPORT_TABLE_03" completed with 1 error(s) at 03:03:58Version
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

    Hello,
    You should use parameter file.Another question i can see you are using 11g.Why don't you use data pump?.
    Data Pump is faster and have more features and enhancement than regular imp and exp.
    You can do the following:
    sqlplus / as sysdba
    Create directory DPUMP_DIR3  for 'Type here your os path that you want to export to';then touch a file:
    touch par.txt
    In this file type the following the following :
    tables=schema.table_name
    dumpfile=yourdump.dmp
    DIRECTORY=DPUMP_DIR3
    logfile=Your_logfile.log
    QUERY =abs.texp:"where hiredate>'01-JAN-13' "then do the following
    expdp username/password parfile='par.txt'
    If you will import from Oracle 11g to version 10g then you have to addthe parameter "version=10" to the parameter file above
    BR
    Mohamed ELAzab
    http://mohamedelazab.blogspot.com/

  • Select-options with where condition

    Hello ABAPers,
    I want to create a select-options like s_operid for vbpa-kunnr but with a condition specified is VBPA-KUNNR where VBPA-PARVW = 'WE'.
    Thanks in advance. Pls reply asap. Points will definitely be rewarded.
    Ritu

    hi,
    use this
    PARAMETERS : TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID OBLIGATORY.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR TAB_ID.
    DATA : BEGIN OF INT_TAB_ID OCCURS 0,
                TAB_ID TYPE ZALOAD_PROD_COMB-TAB_ID,
             END OF INT_TAB_ID.
      DATA : LOC_MAX TYPE ZALOAD_PROD_COMB-TAB_ID.
      CLEAR INT_TAB_ID.
      REFRESH INT_TAB_ID.
      SELECT MAX( TAB_ID) INTO (LOC_MAX) FROM ZALOAD_PROD_COMB.
      COUNT = LOC_MAX + 1.
      DO 10 TIMES.
        MOVE COUNT TO INT_TAB_ID-TAB_ID.
        APPEND INT_TAB_ID.
        COUNT = COUNT + 1.
      ENDDO.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
         RETFIELD            = 'TAB_ID'                        u201C Internal table field name
         DYNPPROG         = 'PROG_NAME                  u201C Program name
         DYNPNR              = SY-DYNNR
         DYNPROFIELD   =  'TAB_ID'                        u201C Field where u need F4 help
         VALUE_ORG       = 'S'
       WINDOW_TITLE  = u2018Any descriptionu2019
        TABLES
          VALUE_TAB      = INT_TAB_ID.                   u201C Internal table name
    Mark the post answered once ur problem is solved ....

  • Export/Import with apps user or EUL schema owner ?

    Hi,
    I am working with a migration plan to move Discoverer 9 to Discoverer 10.
    It is an apps mode EUL, where business areas and workbooks have been granted to Apps Users & Responsibilities.
    Customer has only maintained the EUL with the database user of the EUL owner.
    What is recommended for exporting/importing the EUL from 9 to 10.
    To connect to Administrator as the EUL owner, or to connect as an apps user ( SYSADMIN ? )
    Will all the grants to apps users/responsibilities work when importing as schema owner ?
    I tried to create a entire EUL export file connected as EUL owner, and for the workbooks the export log contained :
    1234#.Workbook name1
    2345#.Workbook name 2
    1234 is the user_id for the workbook owner ( All workbooks have been created by an apps user )
    Will the import process manage to convert this user_id, and set the correct owner for the imported workbooks ?
    ( I will use the option Only take ownership if original owner not found )
    I am not sure, but I think I have seen the following syntax in other projects when exporting an apps mode EUL
    SYSADMIN.Workbook name 1
    SYSADMIN.Workbook name 2

    >
    What is recommended for exporting/importing the EUL from 9 to 10.
    To connect to Administrator as the EUL owner, or to connect as an apps user ( SYSADMIN ? )
    Will all the grants to apps users/responsibilities work when importing as schema owner ?
    Hi,
    The best that i know is that you should export using the DB user so that you will not have problem with workbooks or BA that you are not granted for (or any other grants or privileges).
    The import should be done using the APPS user (the super user you use).
    That way if you import a workbook that the owner will not be found then you will get the ownership and you can after migration deal with it.
    If you'll do that with the DB (EUL owner) user after migration you will not have access to those workbooks.
    Any way about the workbooks i suggest you'll save them as DIS files for cases that the import of the workbooks or the owner association for them fail.

  • Portal Export Import with DB on different OS

    Hi All,
    I have a quick question about exporting the OracleAS Portal Metadata Repository database. Our source DB is on a different OS to our target DB.
    We are going to apply the 10.1.2.3 patch and associated portal export/import patches to both nodes (from note 263995.1).
    Our understanding was that we would use the method described in Chapter 10 of the Portal 10.1.4 Admin Guide (http://download.oracle.com/docs/cd/B14099_18/portal.1014/b19305/cg_imex.htm).
    However, according to metalink note#276620.1, because our source and target OS are different, we should use the database export/import methodology that is described in Chapter 11 of the Application Server 10.1.2 Admin Guide (http://download.oracle.com/docs/cd/B14099_18/core.1012/b13995/prodtest.htm).
    Could anyone tell me which way is better, we would prefer to use the database export/import method, has anyone tried this and what are their experiences.
    Regards,
    Tim.

    kirwantd wrote:
    We are going to apply the 10.1.2.3 patch and associated portal export/import patches to both nodes (from note 263995.1).
    Our understanding was that we would use the method described in Chapter 10 of the Portal 10.1.4 Admin Guide (http://download.oracle.com/docs/cd/B14099_18/portal.1014/b19305/cg_imex.htm).
    However, according to metalink note #276620.1, because our source and target OS are different, we should use the database export/import methodology that is described in Chapter 11 of the Application Server 10.1.2 Admin Guide (http://download.oracle.com/docs/cd/B14099_18/core.1012/b13995/prodtest.htm).
    Could anyone tell me which way is better, we would prefer to use the database export/import method, has anyone tried this and what are their experiences.
    Regards,
    Tim.As far as your referred Metalink note is concerned, it gives you three options to move your repository with if you are working with 10.1.4 Portal.
    It's a difference of can, should and must.
    - It only shows ability to use three options ( can );
    - on the whole, it does not give preferences for any method ( should );
    - nor does it put a requirement for any single option ( must ).
    ( the only requirement/prohibition is for the option 2 which is not supported ).
    we have used the first three methods given on the note (yes, we also tried 2; this note came later). 1 is what we use regularly for transports between environments; and 3 we use for environment staging (as given in chap 11 of pt. 3). both can be messy with a large repository (we do so for about ~400 GB) repository. but following that supportability guide (Metalink Note 333867.1), method 1 works too.
    hope that helps!
    AMN

  • Export / Import with FULL=Y

    Hello DBA's,
    after consulting several thread on exp/imp with the option full=y the doubt that I have left is when using imp with full=y ignore=y in a new data base, the data base obtained will be equal to the data base from which export with full=y became. Thanks for its answers.

    export full=y
    will export all the user ,roles,tablespace creation scripts,tables all the datadictionary views
    for example if u connect the databse with single user try to get the privileges from the existing Db and then
    create the database in the new server
    create users and grant privileges before import;
    then import with fromuser= ,touser
    if you issues FULL=y
    it will start creating all the system ,index and all the other tablespaces provided it should have the same directories as it is in current DB
    to avoid create the dataabse ,tablespace users then import with fromuser,touser option
    thanks

  • Outbound merge not working with where conditions in 10g

    Hi,
    These are my database details both remote and local database
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionI am doing a merge into a remote database from a local table using below query...
    MERGE into sap_mmd_po_all@cosmic_dev.somedomainname trg using (select * from sap_mmd_cmas_po where upload_flag in ('I','U')) src
      on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ)
      WHEN MATCHED THEN
        update set
          trg.PO_STATUS_FLG=src.PO_STATUS_FLG,
          trg.SHIP_TO_FACILITY_CD=src.SHIP_TO_FACILITY_CD,
          trg.DELV_TO_PHONE_NO=src.DELV_TO_PHONE_NO,
          trg.DELV_TO_NM=src.DELV_TO_NM,
          trg.DELV_TO_ADDRESS_1=src.DELV_TO_ADDRESS_1,
          trg.PO_ITEM_NO=src.PO_ITEM_NO,
          trg.ITEM_DESCRP=src.ITEM_DESCRP,
          trg.PARTY_NM=src.PARTY_NM,
          trg.VENDOR_ITEM_ID=src.VENDOR_ITEM_ID,
          trg.PO_LN_CRTE_DT=src.PO_LN_CRTE_DT,
          trg.BILL_UOM_CD=src.BILL_UOM_CD,
          trg.COMMODITY_CD=src.COMMODITY_CD,
          trg.COMMODITY_NM=src.COMMODITY_NM,
          trg.BSNSS_UNIT_NO=src.BSNSS_UNIT_NO,
          trg.PO_LN_ORD_QTY=src.PO_LN_ORD_QTY,
          trg.DISTRIB_AMT=src.DISTRIB_AMT,
          trg.PO_LN_DEL_IND=src.PO_LN_DEL_IND,
          trg.PO_DEL_IND=src.PO_DEL_IND,
          trg.PO_TYPE=src.PO_TYPE,
          trg.DOC_DATE=src.DOC_DATE,
          trg.CRTE_DT_TM=src.CRTE_DT_TM,
          trg.UPD_DT_TM=systimestamp,
          trg.SOURCE_SYSTEM=src.SOURCE_SYSTEM,
          trg.PO_LN_LST_CHNGE_DT=src.PO_LN_LST_CHNGE_DT,
          trg.TXJCD=src.TXJCD,
          trg.PLANT=src.PLANT
          where (src.upload_flag='U')--if i remove this then it is working
      WHEN NOT MATCHED THEN
        insert( trg.PO_NO,
                trg.LINE_DISTRIB_SEQ,
                trg.PO_STATUS_FLG,
                trg.SHIP_TO_FACILITY_CD,
                trg.DELV_TO_PHONE_NO,
                trg.DELV_TO_NM,
                trg.DELV_TO_ADDRESS_1,
                trg.PO_ITEM_NO,
                trg.ITEM_DESCRP,
                trg.PARTY_NM,
                trg.VENDOR_ITEM_ID,
                trg.PO_LN_CRTE_DT,
                trg.BILL_UOM_CD,
                trg.COMMODITY_CD,
                trg.COMMODITY_NM,
                trg.BSNSS_UNIT_NO,
                trg.PO_LN_ORD_QTY,
                trg.DISTRIB_AMT,
                trg.PO_LN_DEL_IND,
                trg.PO_DEL_IND,
                trg.PO_TYPE,
                trg.DOC_DATE,
                trg.CRTE_DT_TM,
                trg.UPD_DT_TM,
                trg.SOURCE_SYSTEM,
                trg.PO_LN_LST_CHNGE_DT,
                trg.TXJCD,
                trg.PLANT)
        values( src.PO_NO,
                src.LINE_DISTRIB_SEQ,
                src.PO_STATUS_FLG,
                src.SHIP_TO_FACILITY_CD,
                src.DELV_TO_PHONE_NO,
                src.DELV_TO_NM,
                src.DELV_TO_ADDRESS_1,
                src.PO_ITEM_NO,
                src.ITEM_DESCRP,
                src.PARTY_NM,
                src.VENDOR_ITEM_ID,
                src.PO_LN_CRTE_DT,
                src.BILL_UOM_CD,
                src.COMMODITY_CD,
                src.COMMODITY_NM,
                src.BSNSS_UNIT_NO,
                src.PO_LN_ORD_QTY,
                src.DISTRIB_AMT,
                src.PO_LN_DEL_IND,
                src.PO_DEL_IND,
                src.PO_TYPE,
                src.DOC_DATE,
                systimestamp,
                src.UPD_DT_TM,
                src.SOURCE_SYSTEM,
                src.PO_LN_LST_CHNGE_DT,
                src.TXJCD,
                src.PLANT)
                where src.upload_flag='I'--if i remove this then it is working
                ;And it is throwing an error like...
    SQL Error: ORA-00904: "A3"."UPLOAD_FLAG": invalid identifierBut when I replace the remote table name with local table name then query is functioning fine...
    table structure in local database..
    CREATE TABLE SAP_MMD_CMAS_PO
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "UPLOAD_FLAG" VARCHAR2(1 BYTE),
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
    --table structure in remote database table
    CREATE TABLE SAP_MMD_PO_ALL
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "DELETE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N',
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
      )It seems to me like a bug, but not quite sure...
    your suggestions are appreciated.
    Thanks,
    Ravi Kumar
    Edited by: ravikumar.sv on Dec 14, 2009 1:31 PM
    Commented the where conditions in merge query

    Hi,
    Yes, i hit the same error....
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
      2  when matched then update set test1.col1=test2.col2 where test2.id=2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
    ERROR at line 1:
    ORA-00904: "A3"."ID": invalid identifier
    ORA-02063: preceding line from TEST_DBLINKBUT here is a work around...to add the where condition while joining(ON) itself.
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id and tes
    t2.id=2)
      2  when matched then update set test1.col1=test2.col2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    2 rows merged.
    SQL>For you the condition would be...
    on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ AND src.upload_flag='U')cheers,
    Edited by: Avinash Tripathi on Dec 14, 2009 2:53 PM

  • Dynamic LOV with where conditions

    Hi all! I have a question regarding Dynamic LOVs. I have a List of values that can be used from three pages, the query is something like this:
    SELECT a.CODE CODE_DISPLAY,
    a.CODE CODE_RETURN
    FROM OREF_COUNTRIES a,
    OREF_REGIONS b
    WHERE a.REG_ID = b.ID AND
    b.CODE = :P336_LOV_REGION;
    The thing is I don't want to hardcode the name of the item ":P336_LOV_REGION" because this is the name of 1 item of one page, and I'd like to use this LOV from another two pages, so the name of the item won't be ":P336_LOV_REGION". How can I create a reusable dynamic LOV with a where condition depending on one item of the page?
    Thanks!!

    hi! anyone has any information about this?
    Daniela.

  • Loop at table with unspecified type but with where-condition

    Hi,
    Doing a loop over an internal table with unspecified type and in addition using a condtion may be done as follows: Thereby the
    condition would be "... WHERE parentid EQ i_nodeid" if the type of <it_htab> would be static. However dynamic specification of a component through bracketed character-type data objects is not possible.
    FIELD-SYMBOLS: <it_htab> TYPE STANDARD TABLE,
                                    <wa_htab> TYPE ANY,
                                    <parentid> TYPE rsparent.
      ASSIGN me->ref_htab->* TO <it_htab>.
      LOOP AT <it_htab> ASSIGNING <wa_htab>.
        ASSIGN COMPONENT 'PARENTID' OF STRUCTURE <wa_htab> TO <parentid>.
        CHECK <parentid> EQ i_nodeid.
      ENDLOOP.
    Since you have to loop over the whole table and to check within the loop whether the condition is fullfilled, this is rather bad for performance.
    Questions: Are there any tricks to do this better?
    Best Regards and Thank you,
    Ingo

    >
    Lalit Mohan Gupta wrote:
    > you can put the condition in the where clause....
    only if you have the upcoming 7.0 EhP2 (Kernel 7.02 or 7.20) the following dynamic where works:
    DATA cond_syntax TYPE string.
    cond_syntax = `parentid = i_nodeid`.
    LOOP AT <it_htab> ASSIGNING <wa_htab>
                           WHERE (cond_syntax).
    in older releases you would have to use program generation to achieve a dynamic where... .
    Kind regards,
    Hermann

  • Export / import with logical system

    Re: AC 5.3 - RAR - SP17
    I have DEV and QA connected to GRC DEV\QA and am defining my ruleset here. The ruleset is defined against a logical system.
    I have PRD connected to GRC PRD and want to import the ruleset that I have developed in GRC DEV\QA. I have exported the ruleset using utilies \ export and then try to import using the utilies \ import function I get an error message and cannot import the rules into the GRC PRD system. When exporting I have selected the ruleset to export against the logical system. When importing I am selecting the physical system. Will that work ? What am I missing ?
    Edited by: Jan  Chan on Jul 8, 2011 5:02 PM

    I determined that there was some corrupt data in the ruleset connected to the logical system that I was exporting. Attempted to correct it by removing the entries and regenerating the rules under the logical system area. All attempts to correct the data have not worked - even removing the "Action" completely from the ruleset but the data still contains the corrupt data associated with the logical system. May need to use "manage deletion" to completely remove it but my entire ruleset is defined for this logical system.
    I don't think there's a simple way to just change the "system" on each functions "action" - mass function maintenance does not appear to work for this.

  • Export Import with different tablespaces

    Does anyone know if there is a way to export from one database (creating a dmp file) and then importing into another database with different tablespaces? I have tried this and get this error:
    ORA 959. It complained that the tablespace doesnt exist (which it doesnt). Is there a way I can change the export or import parameters to avoid this and just use the default tablespaces?
    I may well be missing the point here so please feel free to tell me I am being a fool.
    Thanks
    Johan

    Example. All these tables are from the same schema with the same tablespace specified in the dmp file. There are many more and 90 % fail but not all.
    importing SCHEMA1 objects into SCHEMA2
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "ACCOUNT_RPRT_NOT_TOBE_PUBLISH" ("O__NUM" CHAR(13) NOT NULL EN"
    "ABLE, "O__ST" NUMBER(4, 0) NOT NULL ENABLE, "STEP_COUNTER" NUMBER(7, 0), "S"
    "TATUS" NUMBER(1, 0), "RETRY_COUNTER" NUMBER(5, 0), "RESTART_COUNTER" NUMBER"
    "(5, 0), "PID" NUMBER(3, 0), "OBJ_LOCK" VARCHAR2(10), "MYFILE" VARCHAR2(200)"
    ", "LONG_FIELD" CLOB, "LAST_SELECT_B_S" VARCHAR2(250), "LAST_SELECTION" VARC"
    "HAR2(250), "L_EXECUTION_CTRL" CHAR(13), "ID" NUMBER(6, 0), "ERROR_COUNTER" "
    "NUMBER(7, 0), "CREATION_TIME" NUMBER(5, 0), "CREATION_DATE" NUMBER(6, 0), ""
    "COMPLETION_TIME" NUMBER(5, 0), "COMPLETION_DATE" NUMBER(6, 0), "COMMIT_COUN"
    "TER" NUMBER(5, 0)) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(I"
    "NITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "AIA_DATA_T_256K" LO"
    "GGING NOCOMPRESS LOB ("LONG_FIELD") STORE AS (TABLESPACE "AIA_DATA_T_256K""
    " ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE STORAGE(INITIAL 65"
    "536 FREELISTS 1 FREELIST GROUPS 1))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'AIA_DATA_T_256K' does not exist
    . . importing table "ACTUARIAL_RPT_CNTR" 0 rows imported
    . . importing table "ACTUARIAL_RPT_CVRG" 0 rows imported
    . . importing table "ALIS_CANCEL_BILLING" 2799 rows imported

  • Export/import with objects in another schema

    In 9.2
    I created two users: `live` and `world`
    `live`> create type nam as object (txt varchar2) not final;
    `system`> grant under any type to world;
    `world`> create type nam_world under live.nam (txt2 varchar2);
    and
    create table nams of nam_world;
    and new row
    insert into nams values ('qwerty', 'ytrewq');
    I build dump file:
    exp system/manager FILE=live_world.dmp OWNER=live,world
    All this successfully!!!
    At another server (also 9.2) this export session terminated with errors:
    imp SYSTEM/manager FILE=live_world.dmp FROMUSER=live,world TOUSER=live,world
    Not help parameter IGNORE=Y
    Not help parameter TOID_NOVALIDATE=(live.nam)
    In any case: "Skipping table "WORLD"."NAMS" because object type "LIVE"."NAM" cannot be created or has different identifier"
    General effect, what import simply not visible type live.nam
    How import tables with objects in another users schema?
    Please, help me.

    Hi Vishwanath,
    You can export the objects as TPZ's
    go to Tools---> Export configuration objects, to export them, and import configuration objects to reimport them.
    cheers
    Prashanth

  • How to create feilds in Webi reports with where condition

    I need to create a feild display name by keeping the constraint condition
    o     Display value – dbo.Personnel.Fullname   METRICPERSONNEL
    o     Joining tables – dbo.MetricRequestTeam.MetricRequestKey, dbo.MetricRequest.MetricRequestKey
    o     Constraint – dbo.MetricRequestTeam.MetricRoleTypeKey = ‘2’
    How we can do this in webi level.
    Thanks

    Hi Sasi,
    I am taking assumption that you have already merged both the table at report level on common column.
    So for Analyst column in report you want to display :
    IF  dbo.MetricRequestTeam.MetricRoleTypeKey = ‘2’ THEN "Lead"
    Else IF dbo.MetricRequestTeam.MetricRoleTypeKey = ‘4’  THEN "Analyst"
    Am i Right??
    For this just create a variable  ( I think here it will be a Dimension) with following formula:
    =If([Column_Name] =2) then "Lead"
    Else (IF([Column_Name] =4 then "Analyst" else "None")))
    Drag this variable to analyst column it will give you desired values.
    Points to remember:
    If the data type of column "dbo.MetricRequestTeam.MetricRoleTypeKey" is string then put "2" or "4" in formula else it will give you #syntax error.
    Alternatively you can also give following formula:
    =If([Column_Name] InList ("2") ; "Lead";
    (IF([Column_Name] InList("4") ; "Analyst" ; "None")))
    Hope it helps!
    PS: you have already marked a reply as correct answer
    Thanks,
    Shardendu

  • Select with where condition comparing different domains

    SELECT *
               FROM table
               FOR ALL ENTRIES IN it_temp
               WHERE col1 =  it_temp-col_id.
    col1 is of type char20
    it_temp-col_id is of type char10.
    "col1" and "it_temp-col_id" must have the same type and the same length.
    do someone know a workaround?
    thanks!!

    types : begin of ity_temp_1,
                   col_temp type table-col1, " this is type 20.
                endof ity_temp_1.
    data: lt_temp_1 type standard table of ity_temp_1,
             ls_temp_1 type ity_temp_1.
    loop at it_temp into is_temp.
        clear ls_temp_1.
        ls_temp_1-col_temp =    is_temp-col1. " passing col1(type 10 to col_temp of type 20.)
        append ls_temp_1 into lt_temp_1.
        clear : is_temp.
    endloop.
    "now lt_temp_1 holds matching domain.
    SELECT *
    FROM table
    FOR ALL ENTRIES IN lt_temp_1 " comparing with passed values with same domain
    WHERE col1 = lt_temp_1-col_temp.

Maybe you are looking for

  • How do I change my Apple ID that is associated with iCloud on my iPhone 5?

    When I go into iCloud settings on my phone it is connected with my old and now non-existent Apple ID.  The option to change it does not appear to be there and now I am getting constant pop ups asking for the password of this non-existent account. Hel

  • Adobe Reader could not open 'A9R7D1F.tmp'

    Greetings~ I have seen others with this issue, but none of their solutions have been able to fix my problem. When attempting to open a PDF document from a web site, I receive the following error: "Adobe Reader could not open 'A9R7D1F.tmp' because it

  • OIM Integration with Oracle Retek -- Suggestions / Prior Experience ?

    Hello, We are looking to integrate OIM with Retek suite for user management (Automated Provisioning / Termination etc). Has anyone done this before ? Is DB connector feasible option ? Any whitepapers ? Thanks,

  • How can i capitalise i with I in mail on yosemite?

    In earlier OS i was able to establish an autocorrect rule to capitalise i in mail. This does not appear to be possible in Yosemite. When you try to set up a new rule it requires a minimum of two characters and will not accept spaces. Does anyone have

  • Normalization

    how many levels of normalization are there?how many levels are applicable for database design?what is the use of denormalization?