Copying many rows from one table to another

Could anyone tell me the best way to copy many rows (~1,000,000) from one table to another?
I have supplied a snipit of code that is currently being used in our application. I know that this is probably the slowest method to copy the data, but I am not sure what the best way is to proceed. I was thinking that using BULK COLLECT would be better, but I do not know what would happen to the ROLLBACK segment if I did this. Also, should I look at disabling the indexes while the copy is taking place, and then re-enable them after it is complete?
Sample of code currently being used:
PROCEDURE Save_Data
IS
CURSOR SCursor IS
SELECT     ROWID Row_ID
FROM     TMP_SALES_SUMR tmp
WHERE NOT EXISTS
(SELECT 1
     FROM SALES_SUMR
     WHERE sales_ord_no = tmp.sales_ord_no
     AND cat_no = tmp.cat_no
     AND cost_method_cd = tmp.cost_method_cd);
BEGIN
FOR SaveRec IN SCursor LOOP
INSERT INTO SALES_ORD_COST_SUMR
SELECT *
FROM TMP_SALES_ORD_COST_SUMR
WHERE ROWID = SaveRec.Row_ID;
RowCountCommit(); -- Performs a Commit for every xxxx rows
END LOOP;
COMMIT;
EXCEPTION
END Save_Data;
This type of logic is used to copy data for about 8 different tables, each containing approximately 1,000,000 rows of data.

Your best bet is
Insert into SALES_ORD_COST_SUMR
select * from TMP_SALES_ORD_COST_SUMR;
commit;
Read this
http://asktom.oracle.com/pls/ask/f?p=4950:8:15324326393226650969::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:5918938803188
VG

Similar Messages

  • Copying table rows from one table to another table form

    Hi
    I have a problem about Copying table rows from one table to another table form.On jsf pages if you enter command button go anather jsf page and it copy one row to another table row. But when i execute this process for table FORM it doesn't copy I wrote a code under "createRowFromResultSet - overridden for custom java data source support." Code block is:
    ViewRowImpl value = super.createRowFromResultSet(qc, resultSet);
    try{
    AdfFacesContext fct = AdfFacesContext.getCurrentInstance();
    Number abc = (Number)fct.getProcessScope().get("___");
    value.setAttribute("___",abc);
    }catch(Exception ex){System.out.println(ex);  }
    return value;

    Table may be copied with the
    expdp and impdp utilities.
    http://www.oracle.com/technology/products/database/utilities/index.html

  • Copy Long raw from one table to another.

    Hi
    I am trying to copy data from one table to another. Source has one Long Raw column. There are about million rows in source table. And I am using Oracle 8.1.5. Whenever I execute the copy command, I get the following error message: Can someone help me?
    SQL> set long 64000000
    SQL> set copycommit 1
    SQL> set arraysize 100
    SQL> COPY to test/test@testfix CREATE resume_bkup1 using select * from resume;
    Array fetch/bind size is 100. (arraysize is 100)
    Will commit after every array bind. (copycommit is 1)
    Maximum long size is 64000000. (long is 64000000)
    ERROR:
    ORA-01084: invalid argument in OCI call
    SQL>
    Thanks
    V Prakash

    insert into emp_personal(emp_no, emp_pic) select emp_no, emp_pic from emp_personal_old where empno = '10059'
    Read the documentation as suggested by sol.beach.
    And fix your front-end to use supported datatypes.

  • Delete many rows from one table at once URGENT

    Assume we have table called emp.
    table desription:
    SQL> desc emp
    Name Null? Type
    EMPNO NOT NULL NUMBER(6)
    DIVISION NOT NULL NUMBER(3)
    JOB_NO NOT NULL NUMBER(4)
    START_DATE NOT NULL DATE
    select * from emp;
    EMPNO--------DIVISION--------JOB_NO------------START_DATE
    1111------------------011-------------8181--------------04/10/1999
    1111------------------011-------------8181--------------04/10/2004
    2222------------------011-------------3131--------------05/11/2005
    3333-----------------022-------------8181--------------06/09/2001
    3333-----------------044-------------8181--------------06/08/1988
    5555-----------------011-------------8066--------------01/01/2001
    6666-----------------033-------------9600--------------01/01/1999
    7777-----------------044-------------8181--------------06/24/1996
    7777-----------------033-------------8181--------------12/02/1991
    7777-----------------033-------------8181--------------03/01/2002
    9999-----------------044-------------9191--------------03/05/1980
    9999-----------------055-------------9191--------------03/06/1989
    My goal is to delete employee records for those employee which contains multiple values for JOB_NO
    equal to 8181, (JOB_NO= 8181) with new start_dateS.
    We need to keep only one record for JOB_NO 8181 which contains oldest start_date.
    Here is the delete statement for the single record.
    delete from emp
    where empno = 7777 and job_no = 8181 and start_date in ('03/01/2002','06/24/1996);
    So how could I delete thousands records from the table with this logic?
    After deleting multiple records table should be as below:
    select * from emp;
    EMPNO--------DIVISION--------JOB_NO---------START_DATE
    1111-----------------011-------------8181--------------04/10/1999
    2222-----------------011-------------3131--------------05/11/2005
    3333-----------------044-------------8181--------------06/08/1988
    5555-----------------011-------------8066--------------01/01/2001
    6666-----------------033-------------9600--------------01/01/1999
    7777-----------------033-------------8181--------------12/02/1991
    9999-----------------044-------------9191--------------03/05/1980
    9999-----------------055-------------9191--------------03/06/1989

    Here's one way to do it. I think this fits your business rules. At least it matches the output for your first example. It uses an analytic. I just like using them.
    SQL> select * from employees;
                   EMPNO             DIVISION               JOB_NO START_DATE
                    1111                   11                 8181 10-APR-1999
                    1111                   11                 8181 10-APR-2004
                    2222                   11                 3131 11-MAY-2005
                    3333                   22                 8181 09-JUN-2001
                    3333                   44                 8181 08-JUN-1988
                    5555                   11                 8066 01-JAN-2001
                    6666                   33                 9600 01-JAN-1999
                    7777                   44                 8181 24-JUN-1996
                    7777                   33                 8181 02-DEC-1991
                    7777                   33                 8181 01-MAR-2002
                    9999                   44                 9191 05-MAR-1980
                    9999                   55                 9191 06-MAR-1989
    12 rows selected.
    SQL> delete employees
      2  where  rowid in
      3           (select rowid
      4            from
      5            (
      6               select empno
      7                     ,job_no
      8                     ,start_date
      9                     ,row_number() over (partition by empno, job_no order by start_date) rn
    10               from   employees
    11               where  job_no = 8181
    12            )
    13            where rn > 1
    14           )
    15  ;
    4 rows deleted.
    SQL> select * from employees;
                   EMPNO             DIVISION               JOB_NO START_DATE
                    1111                   11                 8181 10-APR-1999
                    2222                   11                 3131 11-MAY-2005
                    3333                   44                 8181 08-JUN-1988
                    5555                   11                 8066 01-JAN-2001
                    6666                   33                 9600 01-JAN-1999
                    7777                   33                 8181 02-DEC-1991
                    9999                   44                 9191 05-MAR-1980
                    9999                   55                 9191 06-MAR-1989
    8 rows selected.

  • Automatic copying row from one table into another one

    Hi,
    I am looking for some help on how to do the following:
    I use Number to track my finances. I have two tables - one for my checking account and the other one for my cash account. When I withdraw cash from my checking account I record a transfer or debit transaction in my checking account table (in the type column of this table I enter "transfer" and in the category column of this table I enter "cash account"); Obviously I have to record a matching transaction in my cash account where the category column shall read "checking account". Both records represent one and the same transaction. In order not to enter this transaction twice I would like to "automate" this process so that once I enter the transaction in either of the two table (checking or cash) the matching entry automatically appears in the other table. Is there any way to do this.
    Thank you,
    Evgeny

    You can use Connection#getMetaData() to retrieve information about the tables and the columns of the table.
    After all, it is better to gain information about the table first and then issue a query in the form of "INSERT INTO table1 SELECT * FROM table2", including the eventual column selections and/or data conversions at SQL level.

  • Archive rows from one table to another, in batches of N at a time

    I am trying to set up an archiving process to move rows out of a large table into an archive table. I am using Oracle 10gR2, and I do not have the partitioning option. The current process is a simple (apologies for the layout, I can't see a way of formatting code neatly for posting...)
    for r in (select ... from table where ...) loop
    insert into arch_table (...) values (r.a, r.b, ...);
    -- error handling
    delete from table where rowid = r.rowid;
    -- error handling
    commit_count := commit_count + 1;
    if commit_count >= N then
    commit;
    commit_count := 0;
    end if;
    end loop;
    I know this is not a good approach - we're looking at fixing it because it's getting the inevitable "snapshot too old" errors, apart from anything else - and I'd like to build something more robust.
    I do need to only take N rows at a time - firstly, because we don't have the space to create a big enough undo tablespace to do everything at once, and secondly, because there is no business reason to insist that the archiving is done in a single transaction - it's perfectly acceptable to do "some at a time" and having multiple commits makes the process restartable while at the same time making some progress on each run.
    My first thought was to use rownum in the where clause to just do a bulk insert then a bulk delete:
    insert into archive_table (...) select ... from table where ... and rownum < N;
    delete from table where ... and rownum < N;
    commit;
    (I'd need some error logging clauses in there to be able to report errors properly, but that's OK).
    However, I can't find anything that convinces me that this type of use of rownum is deterministic - that is, the delete will always delete the same rows that the insert inserted (I could imagine different plans for the insert and the delete, which meant that the rows were selected in a different order). I can't think of a way to prove that this couldn't happen.
    Alternatively, I could do a bulk collect to select the rows in batches, then do a bulk insert followed by a rowid-based delete. That way there's a single select, so there's no issue of mismatches, but this would potentially use a lot of client memory to hold the row set.
    Does anybody have any comments or suggestions on the best way to handle this? I'd prefer a solution along the lines of the first suggestion (use rownum in the where clause) if I could find something I could be sure was reliable. I just have a gut reaction that it "should" be possible to do something like this in a single statement. I've looked briefly at esoteric uses of the merge statement to do the insert/delete in a single statement, but couldn't find anything.
    It's a problem that seems to come up a lot in discussions, but I have never yet seen a decent discussion of the various tradeoffs. (Most solutions I've seen tend to either suggest "bite the bullet and do it in one transaction and give it enough undo" or "use features of the data (for example, a record ID column) to roughly partition the data into manageable sizes", neither of which would be particularly easy in this case).
    Thanks in advance for any help or suggestions.
    Paul

    Actually, you also have a problem in that you get a PLS-00436 error because you can't reference individual attributes of a record in a FORALL. (I think this restriction might have been eased on 11g, but as I'm on 10g I have to live with it :-().
    However, your code did give me an idea - I can just bulk-select ROWID and then do an insert ... select * where rowid = (the selected rowid). I need to consider how efficient this will be, in a bit more detail, and do some tests, but as I'm doing rowid-based selects it should be reasonably good. Here's some sample code:
    -- create table pfm_test as select * from dba_objects;
    -- insert into pfm_test select * from pfm_test;
    -- insert into pfm_test select * from pfm_test;
    -- insert into pfm_test select * from pfm_test;
    -- update pfm_test set created = sysdate - (rownum/24);
    -- commit;
    -- create table pfm_test_archive as select * from pfm_test where 1=0;
    create or replace procedure archive_data (days number, batch number) as
        cursor c is select rowid from pfm_test where created < sysdate-days;
        type t_rowid_arr is table of rowid;
        l_rowid_arr t_rowid_arr;
        i number := 0;
    begin
        loop
         open c;
         fetch c bulk collect into l_rowid_arr limit batch;
         i := i + 1;
         dbms_output.put_line('Batch ' || i || ': ' || l_rowid_arr.count || ' records');
         exit when l_rowid_arr.count = 0;
         forall i in l_rowid_arr.first .. l_rowid_arr.last
           insert into pfm_test_archive
           select * from pfm_test where rowid = l_rowid_arr(i);
         forall i in l_rowid_arr.first .. l_rowid_arr.last
           delete from pfm_test where rowid = l_rowid_arr(i);
         commit;
         close c;
        end loop;
    end;
    -- exec archive_data(17000,1000);Now to look at error handling for FORALL statements...
    Thanks for the help.
    Paul.

  • How to Transfer Rows from one table to another in a different Page

    Hi Friends,
    My problem is; I need to call a custom page as a popup using Java-Script. ( This is because our business users want the multi-select LOV to look and function differently ).
    I have a table in the popped-up page from where; upon a button action I need to close the pop-up and transfer the selected rows , back to the base-page's table.
    ( Both the Base Page and the Pop-Up are Custom Pages.)
    Please find below the AM code that I call before closing the window using Java Script.
    But the Base-Page table remains un-disturbed. Can you please show me how to do the transfer of records if possible ?
    OAViewObjectImpl main_vo = getBasePageTableVO1();
    OAViewObjectImpl sel_vo = getPopupPageTableVO1();
    int fetchedRowCount = sel_vo.getFetchedRowCount();
    RowSetIterator iterator = sel_vo.createRowSetIterator("SelectedRows_Iterator");
    if (fetchedRowCount > 0)
    iterator.setRangeStart(0);
    iterator.setRangeSize(fetchedRowCount);
    for (int i = 0; i < fetchedRowCount; i++)
    PopupPageTableVORowImpl row = (PopupPageTable)iterator.getRowAtRangeIndex(i);
    BasePageTableVORowImpl main_row = (BasePageTableVORowImpl)main_vo.createRow();
    if (main_vo.getFetchedRowCount() == 0)
         main_vo.setMaxFetchSize(0);
         main_vo.setWhereClause(" 1 = 0 ");
         main_vo.executeQuery();
         main_vo.setCurrentRow(main_vo.last());
    main_vo.next();
         main_vo.insertRow(main_row);
         main_row.setNewRowState(main_row.STATUS_INITIALIZED);
         main_vo.setCurrentRow(main_row);
    try
    main_row.setField1(row.getField1());
    main_row.setField2(row.getField2());
    main_row.setField3(row.getField3());
    catch(JboException _ex)
    iterator.closeRowSetIterator();

    Thanks Ramkumar. I am able to catch the action after I used formSubmit .
    The below lines in processRequest declares the function cszRefreshBase and later; on attaching the function name in the open window java script call, I get my desired functionality.
    StringBuffer stringbuffer = new StringBuffer();
    stringbuffer.append("function cszRrefreshBase(lovwin, event) ");
    stringbuffer.append("{ ");
    stringbuffer.append(" if (!lovwin.PopupSL) ");
    stringbuffer.append(" return false; ");
    stringbuffer.append(" submitForm('DefaultFormName', 0, {'cmePopupEvent':'popupUpdate'}); ");
    stringbuffer.append("}");
    oapagecontext.putJavaScriptFunction("cszRefreshBaseJS", stringbuffer.toString());

  • How to copy data from one table to another (in other database)

    Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
    ResultSet rset = stmt.executeQuery("select ...");
    But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.

    No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.

  • Flowing data from one Table to another

    I am new to Numbers and I am having a hard time figuring out how to flow a sum from one table into another table. Is this possible? Please help.
    Thanks
    E

    lassiegirl wrote:
    I am new to Numbers and I am having a hard time figuring out how to flow a sum from one table into another table. Is this possible? Please help.
    Hi lassiegirl,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Apple provides two excellent resources that I recommend be downloaded by all Numbers users, the Numbers '09 User Guide and the iWork Formulas and Functions User Guide. You'll find linke for both of them in the Help menu in Numbers.
    The first will give you an overview of Numbers and how it works—spend some time with the preface and the first chapter, browse the rest on a need to know basis when you're doing something new. The second is a reference, useful when you're trying to write a formula.
    To your question...
    You can copy the sum from one table to another.
    For the example formula beow, both Table 1 and Table 2 have one header row and one footer row, and a total of 21 rows each.
    If the SUM on Table 1 is in cell C21, and you want to include it in the SUM of column C in Table 2, you could transfer the sum to C1 in the header row of Table 2 with:
    C1:  =Table 1::C21
    In C21 of Table 2 (a Footer row), use any of these formulas:
    =SUM(C)+C1
    =SUM(Table 1::C)+SUM(C)
    =SUM(Table 1 :: C,C)
    The first calculates the sum of the cells in column C (of its own table—Table 2) and adds the value in C1, the total transferred from Table 1.
    The second returns the same result by calculating the sums of the two columns separately, then adding those sums.
    The third takes the single arguments of the two SUM statements in the second, and lists them as multiple arguments in a single SUM statement.
    Regards,
    Barry

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • Copying data from one table to another table thru java

    Hi
    I have to copy data from table emp in Database A to table emp in Database B. My input would be table name and number of rows to be fetched. these rows i need to insert in table B.
    The problem over here is I won't be having any info. of table emp i.e the number of columns it has and their type.
    So is their any way i can copy the data from one table to other without having the info abt the number of cols and their type.
    TIA

    Cross post - http://forum.java.sun.com/thread.jspa?threadID=5169293&messageID=9649839#9649839

  • Trigger to copy records from one table to another;  ORA-04091:

    Hello,
    I'm trying to create a trigger that will move data from one table to another.
    I have two tables (Trial1, Trial2) Both of them contains the same attributes (code, c_index)
    I want to move each new record inserted in (code in Trial1) to (code in Trial2)
    This is my trigger:
    Create or replace trigger trg_move_to_trial2
    After insert on Trial1
    for each row
    begin
    insert into Trial2 (code)
    select :new.code from Trial1;
    end;It compiled, but when I insert new (code) record into (Trial1) it display this error:
    Error report:
    SQL Error: ORA-04091: table STU101.TRIAL1 is mutating, trigger/function may not see it
    ORA-06512: at "STU101.TRG_MOVE_TO_TRIAL2", line 3
    ORA-04088: error during execution of trigger 'STU101.TRG_MOVE_TO_TRIAL2'
    04091. 00000 - "table %s.%s is mutating, trigger/function may not see it"
    *Cause:    A trigger (or a user defined plsql function that is referenced in
    this statement) attempted to look at (or modify) a table that was
    in the middle of being modified by the statement which fired it.
    *Action:   Rewrite the trigger (or function) so it does not read that table.I know what does this error mean, but I don't how to fix the error.
    I tried to change the (After insert on Trial1) to be (Before insert on Trial1); that worked, but not in the right way. When I insert new value into (code in Trial1) and refreshed Trial2 table, as much as records I have in Trial 2 they will be duplicated. E.g.
    Trial2
    code
    111
    222
    333when I insert in Trial1
    Trial1
    code
    444
    Trial2 will be:
    code
    111
    222
    333
    444
    444
    444Can you please tell me how to solve this issue?
    Regards,
    Edited by: 1002059 on Apr 23, 2013 5:36 PM

    You should not select from Trial1 - you have the data already. Just insert that value.
    Create or replace trigger trg_move_to_trial2
    After insert on Trial1
    for each row
    begin
    insert into Trial2 (code)
    values (:new.code);
    end; regards,
    David

  • T code to Copy Data from one table to another table

    Hi,
    I want copy all data of one table to its copy table. Anyone knows transaction code to copy data from one table to another table.
    Regards,
    Jigar Thakkar.

    Hi
    Create a small program.
    Extract data from T1 - database table and put it in one internal table - itab1.
    loop the itab1 data .............
        insert itab1 into tab2.   (tab2 - second database table)
    endloop.
    try this....
    hope it works....

  • Adding Data From One Table to Another

    Now, this doesn't strike me as a particularly complex problem, but I've either strayed outside the domain of Numbers or I'm just not looking at the problem from the right angle. In any case, I'm sure you guys can offer some insight.
    What I'm trying to do is, essentially, move data from one table to another. One table is a calendar, a simple two column 'date/task to be completed' affair, the other is a schedule of jogging workouts, i.e, times, distances. Basically, I'm trying to create a formula that copies data from the second table onto the first but only for odd days of the week, excepting Sundays (and assuming Monday as the start of the week). Now, this isn't the hard part, I can do that. The problem comes when I replicate the formula down the calendar. Even on the days when the 'if' statement identifies it as an 'even day', the cell reference to the appropriate workout on the second table is incremented, so when it comes to the next 'odd day', it has skipped a workout.
    I can't seem to see any way of getting it to specifically copy the NEXT line in the second table, and not the corresponding line.
    This began as a distraction to try and organise my running so I could see at a glance what I had to do that day and track my progress, but now it's turned into an obsession. SURELY there's a solution?
    Cheers.

    Hi Sealatron,
    Welcome to Apple Discussions and the Numbers '09 forum.
    Several possible ways to move the data occur to me, but the devil's in the details of how the data is currently arranged.
    Is it
    • a list of three workouts, one for each of Monday, Wednesday and Friday, then the same three repeated the following week?
    • an open-ended list that does not repeat?
    • something else?
    Regards,
    Barry

  • Insert old missing data from one table to another(databaase trigger)

    Hello,
    i want to do two things
    1)I want to insert old missing data from one table to another through a database trigger but it can't be executed that way i don't know what should i do in case of replacing old data in table_1 into table_2
    2)what should i use :NEW. OR :OLD. instead.
    3) what should i do if i have records exising between the two dates
    i want to surpress the existing records.
    the following code is what i have but no effect occured.
    CREATE OR REPLACE TRIGGER ATTENDANCEE_FOLLOWS
    AFTER INSERT ON ACCESSLOG
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    V_COUNT       NUMBER(2);
    V_TIME_OUT    DATE;
    V_DATE_IN     DATE;
    V_DATE_OUT    DATE;
    V_TIME_IN     DATE;
    V_ATT_FLAG    VARCHAR2(3);
    V_EMP_ID      NUMBER(11);
    CURSOR EMP_FOLLOWS IS
    SELECT   EMPLOYEEID , LOGDATE , LOGTIME , INOUT
    FROM     ACCESSLOG
    WHERE    LOGDATE
    BETWEEN  TO_DATE('18/12/2008','dd/mm/rrrr') 
    AND      TO_DATE('19/12/2008','dd/mm/rrrr');
    BEGIN
    FOR EMP IN EMP_FOLLOWS LOOP
    SELECT COUNT(*)
    INTO  V_COUNT
    FROM  EMP_ATTENDANCEE
    WHERE EMP_ID    =  EMP.EMPLOYEEID
    AND    DATE_IN   =  EMP.LOGDATE
    AND    ATT_FLAG = 'I';
    IF V_COUNT = 0  THEN
    INSERT INTO EMP_ATTENDANCEE (EMP_ID, DATE_IN ,DATE_OUT
                                ,TIME_IN ,TIME_OUT,ATT_FLAG)
         VALUES (TO_NUMBER(TO_CHAR(:NEW.employeeid,99999)),
                 TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'),       -- DATE_IN
                 NULL,
                 TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'),      -- TIME_IN
                 NULL ,'I');
    ELSIF   V_COUNT > 0 THEN
    UPDATE  EMP_ATTENDANCEE
        SET DATE_OUT       =  TO_DATE(:NEW.LOGDATE,'dd/mm/rrrr'), -- DATE_OUT,
            TIME_OUT       =   TO_DATE(:NEW.LOGTIME,'HH24:MI:SS'), -- TIME_OUT
            ATT_FLAG       =   'O'
            WHERE EMP_ID   =   TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
            AND   DATE_IN <=  (SELECT MAX (DATE_IN )
                               FROM EMP_ATTENDANCEE
                               WHERE EMP_ID = TO_NUMBER(TO_CHAR(:NEW.employeeid,99999))
                               AND   DATE_OUT IS NULL
                               AND   TIME_OUT IS NULL )
    AND   DATE_OUT  IS NULL
    AND   TIME_OUT IS NULL  ;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN OTHERS THEN RAISE;
    END ATTENDANCEE_FOLLOWS ;
                            Regards,
    Abdetu..

    INSERT INTO SALES_MASTER
       ( NO
       , Name
       , PINCODE )
       SELECT SALESMANNO
            , SALESMANNAME
            , PINCODE
         FROM SALESMAN_MASTER;Regards,
    Christian Balz

Maybe you are looking for

  • Using STORE attributes

    Suppose the replication scheme is specified as below: CREATE REPLICATION REP1 ELEMENT a DATASTORE MASTER masterds on "server1" SUBSCRIBER subscriberds on "server2" RETURN TWOSAFE ELEMENT b DATASTORE MASTER subscriberds on "server2" SUBSCRIBER masterd

  • Can i downgrade ios6 to ios5.1.1 for iphone 4s ?

    Hi everybody, I updated my iphone 4s to ios6 but i find it little bit slow, so the question is: can I downgrade my iphone to ios5.1.1 ? please answer me as fast as you can.

  • Compact flash wont go down

    has anyone had issues with their compact flash mechanism dont going down, the button is stuck in down position and it asks as if its broke.

  • Get rid of that damn context menu!

    I'm using flex in an embedded browser within a win32 application. I need to use my own context menu and the existing one that adobe provides has a settings option that darkens the client area and invalidates my transparency color (i.e. the mask color

  • SSL session resumption

    Hi I tried to find out how to reuse ssl session in java, but i dont find anywhere! Can anyone show me how to reuse it in example. thanks!