How laod from source to the target

Hi experts,

I have two tables a and b

one is 10 records

b there are 10 records

After a while an added table 5 records

so this time how to load 5 records in table b

Please help me

986379 wrote:

MERGE INTO TARGET BB

USING (SELECT NO, NAME OF the source) AA ON (BB.NO = AA.NO)

WHEN MATCHED THEN

UPDATE BB.NO = AA.NO, BB.NAME = AA.NAME SET

WHEN NOT MATCHED THEN

Insert (BB.no, BB. (Name) VALUES (AA.no, AA. (Name)

Error Please help me

An obvious error is the fact that you are tring to update the column 'NO', that is your join column.  You can do that, because it's the same thing that trying to update the primary key on a table... it should not be done.

Just update the column NAME.

Tags: Database

Similar Questions

  • Getting error while inserting data from source to the target in the procedures?

    Hello

    I want to insert the data from the source to the target in the procedures, have the same schema.

    For this, I did as follows

    Command on the source:

    Technologies: oracle

    Schema: EDWHCMB

    Command:

    SELECT COMPANY_NAME, COMPANY_CODE OF

    EDWHCMB. DWT_COMAPNY

    Command on the target:

    Technologies: oracle

    Schema: EDWHCMB

    command:

    INSERT INTO EDWHCMB. TEMP

    VALUES)

    COMPANY_CODE,

    COMPANY_NAME)

    I have run the procudere then I got error as follows

    ODI-1228: SAMPLE1 (procedure) task fails on ORACLE EDWH connection target.

    Caused by: java.sql.BatchUpdateException: ORA-00984: column not allowed here.


    How to insert the data from the source to the target in the proceedings?

    Please send any document to this...

    Please help me.

    Thanks in advance,

    A.Kavya.

    Hi Bruno.

    If your tables are on the same schema then why do you use command on the source and the command on the target? You can simply do the following on the command on the target

    INSERT INTO EDWHCMB. TEMP

    SELECT COMPANY_NAME, COMPANY_CODE OF

    EDWHCMB. DWT_COMAPNY


    If you really want at all to use the command on the source and target both then I think you need to change the following code on your order on the target

    INSERT INTO EDWHCMB. TEMP

    VALUES)

    : COMPANY_CODE,.

    (: COMPANY_NAME)

    Hope your TEMP table has only these 2 columns.

    Thank you

    Ajay

  • Query metadata ODI to find the source and the target table for Interface

    Hi Experts,

    Customer heading there source of EBS 11.5.10 in R12. They are BIApps ODI. 7952 version. Since then, all mappings there are customized they may not disturb on support of Oracle BIApps is concerned.
    Now, we need to know how many ODI mappings there source EBS is the 11.5.10 in R12 migration and we can only target mappings accordingly.

    So, please give me with entries below:

    (1) any request for metadata that will give me the information of the source tables table and target them in against an if-same interface that the source of the main interface is another interface.
    (2) what are the other stuffs that I need to look at from the point of view of the mapping changes when the source is upgrading.e.g. only change the source table is enough or I need to focus on other animals. I feel she's boiling down to create a separate source for R12 adapter.

    Kind regards
    Snehotosh

    First open the designer-> models and check which model has got the mapping of the eBS. Get this code with this TERRIBLE application

    SELECT count (distinct i_pop) of SNP_POP_COL
    where I_POP_COL in
    (
    Select i_pop_col in the SNP_POP_MAPPING where i_source_tab
    in
    (
    Select i_source_tab in the SNP_SOURCE_TAB where i_table in)
    Select i_table in the SNP_TABLE where I_MOD in
    (select i_mod in the SNP_MODEL where mod_name = "PUT_HERE_YOUR_NAME")
    )
    )
    );

    Will not consider some other influence (i.e. the procedure), it will be an indicator of average first level.

  • HP Deskjet 3050: Hp Deskjet 3050 how scan from computer to the printer?

    Since I can't print

    I was wondering how I could scan as to place the paper and scan from the computer?

    Isn't this possible?

    Thanks for the reply

    Sabrina33 wrote:
    ... I was wondering how I could scan as to place the paper and scan from the computer? ...

    Hello

    No, you cannot scan from computer to the printer. You have to put original on the glass and you can use the HP scanner on computer software to scan and save a document/photo scanned on computer.

    My question: do you have installed the software and driver on your computer yet? You should do this first.

    Kind regards.

  • ODI 11.1.1.6 - How to sort the Source or the target

    Hello

    We use the ODI to build hierarchies of metadata in Hyperion planning.  Our source is a SQL Server named «sourceview» view  Column 4 of the view is TREE_LEVEL_NUM.  Column 5 of the view is 'SORTFIELD '.   How sort us by column 4 first and then by column 5 so the staging area has data in the correct order before loading staging area for target?

    We changed the LKM SQL for SQL and ORDER_BY option added in the LKM.  When we go and look at the SQL there is no command sort SQL Anywhere.

    Any ideas or is this even possible?

    There is an example of using "ORDER BY" in the part of the following blog - more to life than that...: 11.1.2 & #8211; planning additional features of ODI mixed with a portion of the ODI 11 G

    See you soon

    John

    http://John-Goodwin.blogspot.com/

  • How do I auto detects the target using the trigger VBAI mode

    Hello world

    I had a vision system of machine ready to take choose using VBAI 2013 sp1.  Also, I use a sensor switch to trigger the camera to take pictures.

    When I type the loop running, it just won't continue to take photos no matther switch sensor triggers the camera or not.  I think it's the step that I used for the recording of the image, in the stage of registration of the image, I used picture newspaper still, but I don't want to use which is only what inspection status allows no other choice.

    So, how can I let the unit wait until he got the trigger of the alarm switch signal, and then take a picture and save the image?

    the stage of inspection to acquire the image, I used the trigger mode and everything worked fine, except the time error settting upward, I used 5000ms and if I put bigger like the 50000ms, VBAI turned really slow and showed time out error.

    If anyone can help me on this matter?

    Thank you

    You can use the diagram States-transitions to go only in a State based on the result produced by some steps.

    First, remove the registration step of the image of the State to check with you get the image

    Press Ctrl + E to turn the main view on the state diagram.

    Right click and create a new State.

    Right click on the State to inspect and create a new transition to this new State.

    Double click on the transition to edit it.

    Choose to acquire the Image - waiting time and set the condition false, to spend in this state when there is no timeout.

    Move the default transition from that State to the final State.

    Click on the new State to select it, and then add the image registration step.

    Using a state diagram, you have programmed an inspection that will record the image when there is no timeout.

    The State-transition diagram is a powerful tool to add a logic, branching and looping of your inspection.

    Open the tutorial 5 - state diagram Branching.vbai and tutorial 6 - State chart Looping.vbai for examples on how to use it.

    I hope this helps.

    Christophe

  • Generic procedure to load the data from the source to the table target

    Hi all

    I want to create a generic procedure to load data of X number of the source table to X number of the target table.

    such as:

    Source1-> Target1

    Source2-> Target2

    -> Target3 Source3

    Each target table has the same structure as the source table.

    The indexes are same as well. Constraint are not predefined in the source or target tables.there is no involved in loading the data from the business logic.

    It would simply add.

    This procedure will be scheduled during off hours and probably only once in a month.

    I created a procedure that does this, and not like:

    (1) make a contribution to the procedure as Source and target table.

    (2) find the index in the target table.

    (3) get the metadata of the target table indexes and pick up.

    (4) delete the index above.

    (5) load the data from the source to the target (Append).

    (6) Re-create the indexes on the target table by using the collection of meta data.

    (7) delete the records in the source table.

    sample proc as: (logging of errors is missing)

    CREATE or REPLACE PROCEDURE PP_LOAD_SOURCE_TARGET (p_source_table IN VARCHAR2,

    p_target_table IN VARCHAR2)

    IS

    V_varchar_tbl. ARRAY TYPE IS VARCHAR2 (32);

    l_varchar_tbl v_varchar_tbl;

    TYPE v_clob_tbl_ind IS TABLE OF VARCHAR2 (32767) INDEX OF PLS_INTEGER;

    l_clob_tbl_ind v_clob_tbl_ind;

    g_owner CONSTANT VARCHAR2 (10): = 'STG '.

    CONSTANT VARCHAR2 G_OBJECT (6): = 'INDEX ';

    BEGIN

    SELECT DISTINCT INDEX_NAME BULK COLLECT

    IN l_varchar_tbl

    OF ALL_INDEXES

    WHERE table_name = p_target_table

    AND the OWNER = g_owner;

    FOR k IN l_varchar_tbl. FIRST... l_varchar_tbl. LAST LOOP

    SELECT DBMS_METADATA. GET_DDL (g_object,

    l_varchar_tbl (k),

    g_owner)

    IN l_clob_tbl_ind (k)

    FROM DUAL;

    END LOOP;

    BECAUSE me IN l_varchar_tbl. FIRST... l_varchar_tbl. LAST LOOP

    RUN IMMEDIATELY "DROP INDEX ' |" l_varchar_tbl (i);

    DBMS_OUTPUT. PUT_LINE (' INDEXED DROPED AS :'|| l_varchar_tbl (i));

    END LOOP;

    RUN IMMEDIATELY ' INSERT / * + APPEND * / INTO ' | p_target_table |

    ' SELECT * FROM ' | '. p_source_table;

    COMMIT;

    FOR s IN l_clob_tbl_ind. FIRST... l_clob_tbl_ind LAST LOOP.

    EXECUTE IMMEDIATE l_clob_tbl_ind (s);

    END LOOP;

    RUN IMMEDIATELY 'TRUNCATE TABLE ' | p_source_table;

    END PP_LOAD_SOURCE_TARGET;

    I want to know:

    1 has anyone put up a similar solution if yes what kind of challenges have to face.

    2. it is a good approach.

    3. How can I minimize the failure of the data load.

    Why not just

    create table to check-in as

    Select "SOURCE1" source, targets "TARGET1", 'Y' union flag double all the

    Select "SOURCE2', 'TARGET2', 'Y' in all the double union

    Select "SOURCE3', 'Target3', 'Y' in all the double union

    Select "SOURCE4', 'TARGET4', 'Y' in all the double union

    Select 'Source.5', 'TARGET5', 'Y' in double

    SOURCE TARGET FLAG
    SOURCE1 TARGET1 THERE
    SOURCE2 TARGET2 THERE
    SOURCE3 TARGET3 THERE
    SOURCE4 TARGET4 THERE
    SOURCE.5 TARGET5 THERE

    declare

    the_command varchar2 (1000);

    Start

    for r in (select source, target of the archiving of the pavilion where = 'Y')

    loop

    the_command: = "insert / * + append * / into ' |" r.Target | ' Select * from ' | '. r.source;

    dbms_output.put_line (the_command);

    -execution immediate the_command;

    the_command: = 'truncate table ' | r.source | "drop storage."

    dbms_output.put_line (the_command);

    -execution immediate the_command;

    dbms_output.put_line(r.source ||) 'table transformed');

    end loop;

    end;

    Insert / * + append * / into select destination1 * source1

    truncate table SOURCE1 drop storage

    Treated SOURCE1 table

    Insert / * + append * / to select TARGET2 * in SOURCE2

    truncate table SOURCE2 drop storage

    Treated SOURCE2 table

    Insert / * + append * / into select target3 * of SOURCE3

    truncate table SOURCE3 drop storage

    Treated SOURCE3 table

    Insert / * + append * / into TARGET4 select * from SOURCE4

    truncate table SOURCE4 drop storage

    Table treated SOURCE4

    Insert / * + append * / into TARGET5 select * from source.5

    truncate table source.5 drop storage

    Treated source.5 table

    Concerning

    Etbin

  • How to calculate the variable on the target, but use the value on the source?

    Hi ODI gurus!

    I use LKM MS SQL for Oracle (bcp-> sqlldr).
    I have a variable which is calculated from tables on the target DB (oracle).
    I would use this calculated value in the filter on the source, but I get error ODI is refreshing to variable on the source database.

    It is possible to update value of variable on the target technology and using calculated value on the source technology?

    Thanks in advance!

    Step 1. In the variable - > refreshing tab - > select the schema and the application required for the Oracle database, so you when you refresh the variable, you get the desired result (for example, the ex - value 25 or whatever you are looking for)
    step 2. Call this variable in the Source filter, where the table_source. COLUMN = #VARIABLE_NAME
    Step 3. Call the Variable in refreshing mode, call the interface.
    So that when the variable is updated to the value that is passed and the source table to get the value of its filter.

    If you do pretty much the same things, can you please paste the error, query and your filter condition. So that we can guide you accordingly.

  • Should what character I configure the target database?

    Should what character I configure the target database?
    should how NLS I set for the target database?
    I have imp data from .dmp file and get the following error message:
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16
       NCHAR character set
    export client uses US7ASCII character set (possible charset conversion)
    export server uses UTF8 NCHAR character set (possible 
       ncharset conversion)
    ...
    IMP-00003: ORACLE error 1861 encountered
    ORA-01861: literal does not match format string

    Now, I think you're right.

    Since you do not trust the accuracy of my posts I will not waste my time trying to answer your questions

  • Transformation with 2 source to 1 target

    Hi all


    I have two variables(schema's) source I need to match the 1 target schema), I need to use the processing activity that I need to register for each two sources to the target of the scheme I have given multiple. Any ideas how I can do this?


    Thank you

    The only way I see is to make a third diagram with two nodes: one for each variable of the source. Create a variable-help for her, having-right/copy the two sources for the corresponding nodes in the help-variable.
    And turn that one to the target.

    Kind regards
    Martian

  • Part 3 EtherCAT Slave: importing XML Device Profile succeeds on host but fails on the target

    Hello

    I'm trying to control a 3rd party via EtherCAT servo drive:

    • Master: NOR-cRIO 9024

    • Slave: Beckhoff AX5203

    I downloaded the files of unit on official website of Beckhoff Description: http://www.beckhoff.com.au/english.asp?download/elconfg.htm (Beckhoff_EtherCAT_XML.zip)

    I followed the instructions to http://digital.ni.com/public.nsf/allkb/FDA1318A8909D02C862574510060DB62 to import the profile description of the device.

    Curiously, the import was successful for the host (and I can now access this device in the LabVIEW LVPROJ file), but it failed for the target.

    Why could this be? (There are no diagnostic messages)

    Hi JKSH,

    Looks like you are using NOR-Industrial Communications for EtherCAT 2.7 or later. What is you project connected to the target when you try to import the file? How are you connected to the target? What is your firewall block FTP transfers? Do you need the ability to programmatically discover slaves EtherCAT (such as DSM or using the VI of Modules Refresh)? If you just want to program the EtherCAT Slave in the LabVIEW project, import the device description files to the host is all that is needed.

    Best regards

  • Add the target properties in the notification

    Hello

    Would like to know, how to add properties to the target in the e-mail notification?
    Is this possible? If Yes, provide evidence for this.

    Thank you
    Paull

    Hi Paul,.

    Please find below documents should meet your needs:

    Note: 750070.1 is to add the properties of the target itself and has no measure for these properties, including notifications.

    If it's for e-mail, they can customize the format for notification by e-mail of installation-> E-mail customization

    Note: 946778.1 how to customize the e-mail Notification content and format in grid control?

    Best regards
    Vincent

  • To the target index maintenance

    When the replication of data occurs to the database target (database source and target are Oracle) through GoldenGate for a specific table, the corresponding Index table to the target also get day?

    Is there a requirement that a similar index should also exist in the source table to achieve?

    GoldenGate uses standard DML operations to apply the data on the target system. Because it uses standard DML (via OIC) all the indexes that exist on the target system are automatically updated by Oracle.

    You can have a totally different indexing scheme on the target that you do on the source. While creating a live reporting environment many customers add additional indexes on the target to help the reports run faster, OLTP performance is no longer a consideration.

    You can even have different keys on the source and the target. In this case, there is manual labor, and you need to specify the keys in the parameter files using the KEYCOLS parameter.

  • How to migrate data from a source to multiple targets (tables)?

    How to migrate data from a source to multiple targets (tables)? Describe the General steps, please or point me to a tutorial

    Yes, a table in a mapping element can be source and target at the same time (i.e. a target can be reused as a source for the rest of the map on the right side of the table).

    Don't forget to check the order of loading (in the property map), to ensure that the reused as source is loaded before the final table target table.

    I tested it and it works. However, the documentation is not said in the link I gave you above:

    "Each element of data store that has entries but no exits in the logical diagram is considered a target."

    Usually, I tend not to do. I am in favour of a Divide and Conquer approach and try to have my mapping as simple as possible. It is easier to debug and maintain.

  • How can I use notifications to send data from different sources for the same chart?

    Hello

    I use the model of 'Continuous measurement and logging' project comes with LV 2013.

    It is extremenly helpful in understanding the messaging between the acquisition, graphic and loops of newspaper. (Thank you NEITHER!)

    I ran into a snag though.

    I want to change so that my graphic loop receives notifications of data from two sources of acquisition by the declarant.

    I have trouble getting the data from the two sources to display on one graph.

    I've isolated the problem in the attached vi.

    Here's what happens:

    1. I create 2 parallel loops data and send the data to a third parallel loop with the notifiers.

    2. the third loop receives data from one of the loops because one of the authors of just receiving notifications is to expire instead of receive data.

    Can anyone suggest how can I fix?

    Thank you.

    -Matt

    Here's my modification of your VI. I put notes on the block diagram to explain the changes. He uses a queue for data transfer to avoid data loss. It uses a notifier to stop loops. All local variables and value property nodes have been eliminated.

    The way loops are arrested probably let some data in the queue. No more of one or two iterations of each of the loops of data acquisition. If you need ensure that all data has been displayed (or recorded in a real application), then you must stop acquiring loop first and read the queue until you know it's empty and both other loops stopped. Then stop the render loop and release the queue and the notifier.

    Lynn

Maybe you are looking for