Insert job completion timestamp to another table

Hi - I have a requirement where I need to insert timestamp end work to another table.

I'm loading of data from oracle to Sql server table table. This job works well. Once this is done, I need to insert the timestamp on the completion of another table in Sql server.

Here's what I did...

(1) created a package with the interface that loads data from oracle to Sql server the table1 table.
(2) created a refresh variable that gets the timestamp.

I want to know if there are any ODI tool that loads this timestamp to another SQL server table once the data is loaded to the first SQL server table.

Appreciate your comments.

Thank you

Simply create a procedure that inserts the timestamp to the relevant sql table by passing the variable as the value and call it as the last step of your package.

Tags: Business Intelligence

Similar Questions

  • update a table, however I would like to save the old news in an another tabl

    Hello all; I have a table called table_one,

    That contains the following information
    carid            place
    Benz            New York
    BMW            London
    This information will usually be updated in the near future, however, I would like a situation where before information is updated, the old information is stored in another table called table_two first. for example, table_one, say that New York is so updated to Toronto, I want

    CARiD place
    Benz New York

    first recorded in table_two before the update is done. How can I do to make it. Thank you

    You can use a trigger to insert the old lines to another table.

    syntax:

    CREATE or REPLACE TRIGGER trigger_name
    BEFORE UPDATE
        ON table_name
        [ FOR EACH ROW ]
    DECLARE
        -- variable declarations
    BEGIN
        -- trigger code
    EXCEPTION
        WHEN ...
        -- exception handling
    END;
    

    for example

    CREATE OR REPLACE TRIGGER emp_before_update
    BEFORE UPDATE ON empployee FOR EACH ROW
    DECLARE
        v_username varchar2(10);
    BEGIN
        insert into employee_backup
         (employee_id,
          first_name,
          last_name)
        values
         (:old.employee_id,
          :old.first_name,
          :old.last_name);
    END;
    
  • How can I insert data from another table into a table containing a timestamp column

    How you insert data from another table in a table if the target table contains a timestamp column. I tried to set the default value of GETDATE() column in the target table, but it does not work.


    I use MS SQL

    Sorry, I managed to get around this by inserting null as the value

  • How to insert data into the table of plain text stored as a CLOB in another table

    Hi people,

    Maybe it's an easy question for someone who is more frequently used files and CLOB.

    I have a table that stores text files in the CLOB column. Files text includes some basic data that I want to load in the other - a text line = a new insert for me. Is there a "trick" how to do it effectively?

    Here is my model:

    Table OS_IMPORT_DOCS, stores the complete files as CLOB
    SQL> desc OS_IMPORT_DOCS
    Name          Type           Nullable Default Comments 
    ------------- -------------- -------- ------- -------- 
    OBJECT_ID     NUMBER                                   
    DATUM_ZMENY   DATE                    sysdate          
    FILE_PATH     VARCHAR2(4000) Y                         
    FILE_NAME     VARCHAR2(4000) Y                         
    FILE_SIZE     NUMBER         Y                         
    LAST_MODIFIED DATE           Y                         
    DOCUMENT      CLOB           Y                         
    STATUS        VARCHAR2(15)   Y        'NEW'  
    Sample data from OS_IMPORT_DOCS
    SQL> select *
      2    from os_import_docs d
      3  order by d.last_modified desc
      4  ;
     
     OBJECT_ID DATUM_ZMENY FILE_PATH                      FILE_NAME       FILE_SIZE  LAST_MODIFIED DOCUMENT    STATUS
    ---------- ----------- ------------------------------ --------------- ---------- ------------- ----------- ---------------
       1815043 13.8.2012 1 d:\data\C120813.DAT            C120813.DAT          16800 13.8.2012 16: <<CLOB>>    NEW
       1815042 13.8.2012 1 d:\data\C120812.DAT            C120812.DAT           3600 12.8.2012 22: <<CLOB>>    NEW
       1815041 13.8.2012 1 d:\data\C120811.DAT            C120811.DAT           1800 11.8.2012 13: <<CLOB>>    NEW
    Example of file CLOB - stored text data (select d.document from os_import_docs d where d.object_id = 1815042 ;)
    061053120820120000AGT000002Osoby                   0000000042301000000017210632
    062322120820120000AGT000002Osoby                   0000000012301000000017197566
    063526120820120001AGT000002Osoby                   0000000012301000000017197566
    064234120820120001AGT000002Osoby                   0000000103301000000162218777
    Above the example text includes "columns" in plain text:
    timestamp - 1-14, SSMIHH24DDMMYYYY position format
    flag - post 15-18
    company code - position 19-27
    etc...

    How can I query data stored within the OS_IMPORT_DOCS. The DOCUMENT column, divide it into columns and insert into another table?
    I have to read this method of 'online' file?


    Thank you very much
    Tomas

    For the first three columns:

    SQL> create type TRecord is object (
      2    ts           timestamp
      3  , flag         varchar2(4)
      4  , company_code varchar2(9)
      5  );
      6  /
    
    Type created
    
    SQL>
    SQL> create type TRecordTable is table of TRecord;
      2  /
    
    Type created
    
    SQL>
    SQL> create or replace function parse_clob (p_doc in clob)
      2  return TRecordTable pipelined
      3  is
      4    lf      number;
      5    eol     varchar2(2) := chr(10);
      6    eollen  number := length(eol);
      7    line    varchar2(32767);
      8    offs    number := 1;
      9  begin
     10    loop
     11      lf := dbms_lob.instr(p_doc, eol, offs);
     12      if lf != 0 then
     13        line := dbms_lob.substr(p_doc, lf - offs + 1 - eollen, offs);
     14        offs := lf + eollen;
     15      else
     16        line := dbms_lob.substr(p_doc, dbms_lob.getlength(p_doc) - offs + 1, offs);
     17      end if;
     18      pipe row (
     19        TRecord(
     20          to_timestamp(substr(line, 1, 14), 'HH24MISSDDMMYYYY')
     21        , substr(line, 15, 4)
     22        , substr(line, 19, 9)
     23        )
     24      );
     25      exit when lf = 0;
     26    end loop;
     27  end;
     28  /
    
    Function created
    
    SQL>
    SQL> select t.*
      2  from os_import_docs d
      3     , table(parse_clob(d.document)) t
      4  where d.object_id = 1815042;
    
    TS                                     FLAG COMPANY_CODE
    -------------------------------------- ---- ------------
    12/08/12 06:10:53,000000               0000 AGT000002
    12/08/12 06:23:22,000000               0000 AGT000002
    12/08/12 06:35:26,000000               0001 AGT000002
    12/08/12 06:42:34,000000               0001 AGT000002
     
    
  • Insert/update of the lines in tabular form from one table to another table

    Hello

    I'm having a tabular presentation for a table (equip_test) with 2 columns (equip_id, equip_name). I create a new

    Button (submit_alt) in this tabular form. I need to insert or update lines that are changed in this table to form

    another table (equip_staging) when you press the submit_alt button. How can I do this? How can I identify which lines are

    Insert or update? The process of the page I am trying since this button is
    begin
    
    FOR i in 1..APEX_APPLICATION.G_F01.count
    
    LOOP
    insert into equip_staging values(APEX_APPLICATION.G_F02(i),APEX_APPLICATION.G_F03(i));
    END LOOP;
    
    end;
    But it does not work. Help, please

    Thank you

    TJ

    Unchecking (does not) the column is a problem. Use this SQL instead (which is included in my examples):

    SELECT empno,
              empno
           || apex_item.hidden (33, wwv_flow_item.md5 (ename, sal, job))
                                                                    empno_display,
           ename, sal, job
      FROM emp
    

    and join this column hidden from your display column. In this way, it should work. When you feel there is no data found message in the treatment in a table, it will mean that the id does not exist.

    Denes Kubicek
    ------------------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    ------------------------------------------------------------------------------

  • I'm trying to create another table and insert data to practice... How can I insert multiple values?

    I created another table for practice on two tables queries now.

    That's what I have:

    Insert in the test

    (address, age, status, DriverID)

    values ("131 Shore Drive", "Edison, NJ, 08011 ', ' 55', m ', '2').

    ("' 62 central avenue", "Middletown, NJ 08011', ' 43 ', am ', ' 1'");

    ('98 main street', ' Bristol, PA 19116 ', ' 67', the of ', '3' ").

    ('15 wrong Way', ' Long Island, NY 10111 ', ' 60', 'W', '4' '),

    ("' Kevin 9 Place", "New York, NY 10111 ', ' 25', the of ', '5'");

    It says command SQL is not properly terminated.

    Like this:

    Insert into test (address, age, status, DriverID)

    values ("131 Shore Drive", "Edison, NJ, 08011 ', ' 55', m ', '2');

    Insert into test (address, age, status, DriverID)

    values ("62 Middle Avenue", "Middletown, NJ 08011', ' 43 ', am ', ' 1'");

    ...

  • trigger for insertion of a table to another table

    Hello again,

    I tried to write a trigger after insert or update will happen in table 1, it will move some values in another table, as shown below:

    Create or replace trigger Insert_Amount_Credit after insert or update on Reciept_Voucher

    Referencing NEW AS NEW OLD OLD FOR EACH LINE AS
    Start

    Insert into customer_Details (Transaction_Date, client_name, Description, credit) values (new. Rec_Date, new. Client_name, CONCAT (' receipt number:', again.) Rec_ID), new. Amount);

    End;

    /

    The trigger was created but with compilation error... and my question is:

    1. How do I write the code above in the best way?

    2. How can I enough the other table with a table concatenated as what I was trying to make above?

    any idea?

    Something like that?

    CREATE OR REPLACE TRIGGER trig_ins_testtrg2

    BEFORE INSERT OR UPDATE ON test_trg1

    FOR EACH LINE

    BEGIN

    INSERT INTO test_trg2 (curr_date,

    job_id,

    reason,

    credit)

    VALUES (SYSDATE,

    : NEW.id,.

    : NEW.receipt_no |:NEW.description,.

    (: NEW.amount);

    END;

  • Insert the data in the table another table

    Hi experts,

    I am currently using the version below:
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production           
    PL/SQL Release 11.2.0.1.0 - Production                                           
    CORE     11.2.0.1.0     Production                                                         
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production                          
    NLSRTL Version 11.2.0.1.0 - Production                                           
    My requirement is to insert a table of data in the other table.

    Table 1:
    create table a (a1 number);
    
    insert into a values (1);
    insert into a values (null);
    insert into a values (3);
    Table 2:
    CREATE TABLE c (b1 number not null);
    
    
    Note : table c have b1 column with not null constraint
    I wrote the code to insert the lines below.
     declare 
    v_a1 a.a1%TYPE;
    CURSOR c1 IS SELECT a1 FROM a;
    BEGIN
    OPEN c1;
    for i in 1..3 loop
    FETCH c1 INTO v_a1;
    EXIT WHEN c1%notfound;
    INSERT INTO c values(v_a1);
    commit;
    end loop;
    close c1;
    end;
    He insert 1 row, then after I get the error message like: 01400. 00000 - "impossible to insert a NULL value in (%s)."


    But I want the output as:
    SELECT * FROM c;
    
    OUTPUT :
    1
    3
    Please give the solution to the prescription above.


    Thank you

    I think you are looking for DML ERROR LOGGING

    SQL> desc a_tab
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ------------------------------------
     COL1                                                           NUMBER
     COL2                                                           NUMBER
     COL3                                                           NUMBER
     COL4                                                           NUMBER
    
    SQL> desc b_tab
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ------------------------------------
     COL1                                                  NOT NULL NUMBER
     COL2                                                  NOT NULL NUMBER
     COL3                                                           NUMBER
     COL4                                                           NUMBER
    
    SQL> execute dbms_errlog.create_error_log('b_tab', 'b_tab_err')
    
    PL/SQL procedure successfully completed.
    
    SQL> desc b_tab_err
     Name                                                  Null?    Type
     ----------------------------------------------------- -------- ------------------------------------
     ORA_ERR_NUMBER$                                                NUMBER
     ORA_ERR_MESG$                                                  VARCHAR2(2000)
     ORA_ERR_ROWID$                                                 ROWID
     ORA_ERR_OPTYP$                                                 VARCHAR2(2)
     ORA_ERR_TAG$                                                   VARCHAR2(2000)
     COL1                                                           VARCHAR2(4000)
     COL2                                                           VARCHAR2(4000)
     COL3                                                           VARCHAR2(4000)
     COL4                                                           VARCHAR2(4000)
    
    SQL> insert into b_tab(col1, col2, col3, col4)
      2  select col1, col2, col3, col4
      3    from a_tab
      4  log errors into b_tab_err('my_test') reject limit unlimited;
    
    2 rows created.
    
    SQL> select * from b_tab;
    
          COL1       COL2       COL3       COL4
    ---------- ---------- ---------- ----------
             1          2          3          4
             6          8          4          9
    
    SQL> set serveroutput on
    SQL>
    SQL> exec dev_util.print_table('select * from b_tab_err')
    
    -------------------------------------------------------
    Field Name                      Field Value
    -------------------------------------------------------
    ORA_ERR_NUMBER$               : 1400
    ORA_ERR_MESG$                 : ORA-01400: cannot insert NULL into("ARBORU"."B_TAB"."COL2")
    ORA_ERR_ROWID$                :
    ORA_ERR_OPTYP$                : I
    ORA_ERR_TAG$                  : my_test
    COL1                          : 5
    COL2                          :
    COL3                          : 3
    COL4                          : 6
    -------------------------------------------------------
    Field Name                      Field Value
    -------------------------------------------------------
    ORA_ERR_NUMBER$               : 1
    ORA_ERR_MESG$                 : ORA-00001: unique constraint(ARBORU.SYS_C00658187) violated
    ORA_ERR_ROWID$                :
    ORA_ERR_OPTYP$                : I
    ORA_ERR_TAG$                  : my_test
    COL1                          : 1
    COL2                          : 9
    COL3                          : 9
    COL4                          : 0
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    
  • Inserting data from one table to another table

    Hello

    I have the following SQL where I am updating a table by adding new data from another table, but without success.

    INSERT INTO
    () TOP_PROSPECTS
    COMMON_ID
    DATE_ADDED
    REVIEW_RANK
    EVAL_DATE
    PM_ASSIGN
    WHY_NOTES)
    SELECT
    t.COMMON_ID
    t.DATE_ADDED
    t.REVIEW_RANK
    t.EVAL_DATE
    t.PM_ASSIGN
    t.WHY_NOTES
    Of
    TEMP_IVAN_MARY t
    WHERE
    COMMON_ID <>t.COMMON_ID

    Any suggestions?

    Thank you.

    Published by: user13822709 on August 14, 2012 09:14

    Published by: user13822709 on August 14, 2012 09:15

    Is that what you're trying to do with the insert. I think there may be a sign {noformat}<{noformat}{noformat}>{noformat} missing in the where clause. This site eat those, so you need to use the equivalent! = post here.

    If I'm wrong about the missing trader, then it looks like you want to insert rows in temp_ivan_mary that are not already in top_prospects. If Yes, then you need something like:

    insert into top_prospects
       (common_id, date_added, review_rank, eval_date, pm_assign,
        why_notes)
    select t.common_id, t.date_added, t.review_rank, t.eval_date,
           t.pm_assign, t.why_notes
    from temp_ivan_mary t
    where t.common_id not in (select common_id from top_prospects
                              where common_id is not null)
    

    Function index and data available volumnes etc. then a mergr can be more effective. Something like:

    merge into top_prospects p
       using (select common_id, date_added, review_rank, eval_date,
                     pm_assign, why_notes
              from temp_ivan_mary) t
       on (p.common_id = t.common_id)
       when not matched then
          insert (common_id, date_added, review_rank, eval_date, pm_assign,
                  why_notes)
          values (t.common_id, t.date_added, t.review_rank, t.eval_date,
                  t.pm_assign, t.why_notes)
    from temp_ivan_mary t
    

    John

  • updated line and insert them into another table with trigger.

    Hi guys I have a table that looks like this.
    CREATE TABLE TEST
      (
        "COL1" VARCHAR2(20 BYTE),
        "COL2" VARCHAR2(20 BYTE),
        "COL3" VARCHAR2(20 BYTE)
      )
    I'm going to insert the col1 and col2 values, but I need to get the value of column 3 of table 2 and then insert the complete record in table 3. I love doing that with a trigger. I get an error message and I can't for the life of me figuere out what im doing wrong.
    So here is my nonfunctional trigger.


    Here are the two table

    CREATE TABLE TESTTABLE
      (
        "COLUMN1" NUMBER(15,0),
        "COLUMN2" NUMBER(15,0)
      )
     
    
    Insert into TESTTABLE (COLUMN1,COLUMN2) values (1,5);
    HERE IS THE CODE OF THE TRIGGER
    CREATE OR REPLACE TRIGGER TRIGGER1 
    AFTER INSERT ON TEST 
    FOR EACH ROW 
    BEGIN
      update TEST
      SET COL3 = (SELECT COLUMN2 FROM TEST, TESTTABLE WHERE COLUMN1 = :new.COL1);
    END
    I get an error of trigger mutation that I tried the other iterations of the above but I'm not getting anywhere. I have dumb down my problem at these 3 table.
    Can someone point me in the right direction.

    You'll have to do some reading, but it comes down to process the data on education instead of line level.
    You may even be not at all a trigger.
    See:
    http://www.Oracle-base.com/articles/9i/mutating-table-exceptions.php
    http://asktom.Oracle.com/pls/asktom/asktom.download_file?p_file=6551198119097816936

  • Insert the result of a query select in another table

    Hello

    I have a strange problem when I try to insert all the results of a query select in another table, using the declaration of the order.

    With the declaration of COMMAND it works fine
    Work:
    ------------------------------
    INSERT INTO ADART01 (SELECT (codart)
    "STOCK". "" CODART_STO ".
    Of
    "DB". ' ' 'ACTIONS');
    ------------------------------

    But if I try to sort the result using the declaration of the ORDER, I have the following error:
    Error: ORA-00907 missing right parenthesis
    ------------------------------
    INSERT INTO ADART01 (SELECT (codart)
    "STOCK". "" CODART_STO ".
    Of
    "DB". "" "ACTIONS"
    ORDER BY
    "STOCK". ("' CODART_STO ASC ');
    ------------------------------

    Any idea?

    Thank you for your help,
    Angel.

    delete "()" to select

    create table test1 (a number, b varchar2(100));
    
    insert into test1
        (a, b)
        select level, 'level ' || level from dual connect by level < 101;
    
    insert into test1
        (a, b)
        select level, 'level ' || level from dual connect by level < 101 order by to_char(sysdate - level, 'D');
    
    select * from test1;
    
    drop table test1;
    
  • Insert values from another table

    Hello I have a table:

    T1
    ---
    ID
    user

    and another table:
    T2
    ---
    intellectual property
    Mac

    So I modified T1:
    ALTER table T1 add ip number (20);
    ALTER table T1 add mac number (20);

    So I have:
    T1
    ---
    ID
    user
    intellectual property
    Mac

    T1 and T2 are the same number of lines.

    Now, I want to insert the values of IP and mac of T2 in the fields ip address and mac of T1.
    IP and mac of T2 fields can be "not null".

    How can I do?

    Thanks in advance

    and what do you think about something like this:

    UPDATE t1
       SET t1.mac =
           (SELECT t2.mac FROM t2 WHERE t2.id = t1.id),
           t1.ip =
           (SELECT t2.ip FROM t2 WHERE t2.id = t1.id)
    

    Give it a shot... validate the results before stolen.

    HTH,
    Thierry

  • Redirect data to another table using before insert trigger.

    Dear all,
    How can I redirect the data to another table in a before Insert trigger? My database is Oracle10g.
    I have a table EMP (EMP_ID, LAST_NAME, SALARY).
    I have another EMP_COPY table with the same structure. I also have a before Insert trigger on the EMP table.
    Based on a condition that I have to redirect the data in table EMP_COPY. Let's say the condition is EMP_ID = 100.
    I fire an insert on EMP table for example INSERT IN EMP(EMP_ID,LAST_NAME,SALARY) VALUES(100,'Dev',500).
    On the inside of the front Insert trigger on the EMP table, I have the code
    IF EMP_ID = 100 THEN
    INSERT INTO EMP_COPY (EMP_ID, LAST_NAME, SALARY)
    VALUES(:NEW.) EMP_ID,: NEW. LAST_NAME,: NEW. SALARY);
    COMMIT;
    ON THE OTHER
    NULL;
    END IF;
    But the problem here is that data goes to EMP table of origin also although I don't want. He should do an Insert into EMP table only if EMP_ID! = 100.

    One way has been to raise a user-defined exception inside the If statement and not handle it so that the original insert on table EMP fails but INSERT comes in the EMP_COPY table. But in this solution since the inside the trigger unhandled exception, it propagates to the calling environment. And I can't stand outside relaxation as the calling environment is a form of Oracle Apps standard that cannot be customized.

    Any kind of help will be highly appreciated that I am fighting for more than two weeks.

    Thanks in advance
    Dev

    Remove the autonomous transaction pragma... and then try again.

  • How to set the default on a table when data is inserted in another table

    Hi all
    I use Jdeveloper 11.1.1.2 and ADFBC.
    I have two tables and tableA, tableB.
    I wish that when I insert a line in tableA, automatically, a row is inserted in tableB.
    How can I do? Creating a java class for tableA OS? How can I reference/create a line in the area of occurrence of another table?

    Thank you

    Andrea

    When you want that to happen... If you want to occur when you run the page, then have it in the getter()... If you like... When you set it... then's it in the Set accessor... You manually assign the id. or is he from any order?

  • Inserting data into one table to another table.

    Hi all

    I'm having a few problems when copying data from the 1 table to another table. I have a data 1 date in a table, and I want to insert data in a partition of the main table. As it is the dev database space by getting a problem. I don't have enough space that I can maintain the data for the same date in 2 places.

    Here every way possible in oracle this 1 table may be made partition in the other table. (Just a question).

    Please suggest me a way out and if possible should be fast that data are more than 50 million lines and size along 10 GB.

    Thank you

    Are the columns of your source table identical to that of the destination partitioned table?

    If so, you can create an empty partition in the partitioned table and then create a swap partition to swap the source with the new empty partition table.

Maybe you are looking for

  • No response on Skype windows Panel 8.

    When someone calls me, I hear the call tune but no Panel appears on the screen to tell me who's calling and no buttons to click to answer. Even the list of "recent" sometimes don't tell me who I missed.

  • Charger output P1m Vibe only 2A. is common?

    Hi guys, I just bought p1m vibe and I get hurt with load. It charges so slow, that he needs more than 7 hours to be fully charged. Maybe it's because the charger output only 2. Because my charger output only 2, what of yours? Your p1m load normally?

  • Exit delay

    I use the output function to complete execution of a labview built exe.  While the façade immediately disappears, the exe remains in memory for 50 seconds before finally ending. If I run the source, it can take as long as 90 seconds before Labview en

  • CiscoIPPhoneDirectory - limit to 10000 bytes?

    I am reposting my question of XML applicaton of sub forums here: Hi, I tried using the CiscoIPPhoneDirectory XML directory and ran into a limit of about 10000 bytes of the XML file.I used SPA504g phone and tested with FW 7.4.6 7.4.7, 7.4.8. Only the

  • Is there a driver for webcam to youcam 3 because mine is not detected and yet it's built in webcam

    Is there a driver for webcam to youcam 3 because mine is not detected and yet it's built in webcam. How is it fixed?