Question about how not to insert the same row twice

hello everyone
i have two tables
table employee_list
employee_id
employee_name
employee_num
employee_date
and table employee_form
employee_id
employee_name
employee_num
employee_date
table employee_form should contain the exact data like employee_list .
if there are missing data i'm inserting it to table employee_form_miss(missing).
now i have a probelm cause the compair between the two table,take place
more then just one time.now if there are still missing data i don't want that to table employee_form_miss will insert the same data that already exist in this table.
i've been thinking about constraints table employee_form_miss(employee_id
employee_name
employee_num
employee_date).
but i think it will be a wird way to handle this because i will do an insert
and then what rollback? or delete?
please help me how to manage this
thanks in advance.

hello everyone
i have two tables
table employee_list
employee_id
employee_name
employee_num
employee_date
and table employee_form
employee_id
employee_name
employee_num
employee_date
i'm using an embedded sql in cobol program
DECLARE AA CURSOR FOR
select a.employee_name ,a.employee_num,a.employee_date
from employee_list a
WHERE a.employee_date = :employee-date
and NOT EXISTS
(select null from employee_form
WHERE employee_name =a.employee_name and
employee_num = a.employee_num and
employee_date = a.employee_date )
i'm doing open and fetch to the cursor.
and loop over the sqlerrd(3) result in order to insert them to the employee_form_miss table
insert into employee_form_miss (employee_name,employee_num,employee_date)
values (:employee-name,:employee-num,:employee-date)
the employee_id in table employee_form_miss there is a trigger which
Increment the sequence by 1 for each row that we insert.
so my question was that if i'm doing a constraint, so still i have to do
an insert and then if there is a constraint to do rollback or delete
from duplicate row. is there a better way to manage this ?
thank you

Similar Messages

  • How do I insert the same footnote twice?

    I have a reference page at the end of my document and don't want to have the actualy footers with the citation at the bottom of every page, is there a way to enter the same footnote on its own and multiple time? (ie. using the footnote style 1 for multiple points as its from the same source).
    Hope someone can help my paper is due tomorrow! haha

    Your question was already asked and answered in a thread entitled : Reference same footnote
    The answer is : you can't.
    Yvan KOENIG (VALLAURIS, France)  mercredi 9 janvier 2011 18:10:30
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please :
    Search for questions similar to your own
    before submitting them to the community

  • How could I insert the deleted row into another table within a trigger?

    Hi,
    How could I insert the deleted row into another table within a trigger? The destination table has the same columns as the source table. Since the statements are in the trigger, it is not allowed to query the source table named 'test'. Thanks! The trigger is as follows, uncompleted:
    CREATE TRIGGER delete_trigger
    AFTER DELETE
    ON test
    FOR EACH ROW
    BEGIN
    -- How could I insert the deleted row into another table
    END delete_trigger;
    Message was edited by:
    user569548

    Hi,
    I'm not sure what's wrong there.
    I read the oracle docs about ANALYZE and ALL_TAB_COLUMNS, and did the following:
    ANALYZE TABLE my_tab VALIDATE STRUCTURE; //went ok.
    SELECT column_name
    FROM all_tab_columns
    WHERE table_name = 'my_tab'; //but no rows selected?
    This topic might not be what this thread should be about. Here I posted a new thread:
    How to get colum names of the newly created table?
    Thanks.
    Message was edited by:
    user569548

  • [solved] inserting the same rows again into that table

    i have a table with some rows now i want to insert the same rows again into that table
    please tell me how to do it?
    not using export please only sql query please
    Message was edited by:
    littlemaster

    i m expecting that u commented on me (may be i m wrong). Only once, which we had already dealt with further up. My comment was continuing along another 'off topic' re: code graffitti. Sorry I you felt I was continuing to get at you.
    (If you look at the 'In Response to' part of ant post you can see which post any p[ost is intended to reply to)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to down load the same app twice to home page

    How do I download the same app twice so I have both on my home screen.  I want to monitor cameras at 2 different locations and need to have 2 apps to load seperate info into each.  When I try to down load the app for the 2nd time the only option is to REPLACE the current app with the same one. Anyone have any ideas?

    Yeah, too bad the app won't let you switch between locations.  I don't think you can have 2 instances of the app running on the BB.  I'm not developer, but I've never seen that before.
    Please click the Thumbs Up icon if this comment has helped you!
    If your issue is resolved, please click the solution button on the resolution!
    Every BlackBerry should have BlackBerry Protect, get it now! | Follow me on Twitter | Bring Back BBM Music!

  • How to down load the same app twice

    How do I download the same app twice so I have both on my home screen.  I want to monitor cameras at 2 different locations and need to have 2 apps to load seperate info into each.  When I try to down load the app for the 2nd time the only option is to REPLACE the current app with the same one. Anyone have any ideas?

    Yeah, too bad the app won't let you switch between locations.  I don't think you can have 2 instances of the app running on the BB.  I'm not developer, but I've never seen that before.
    Please click the Thumbs Up icon if this comment has helped you!
    If your issue is resolved, please click the solution button on the resolution!
    Every BlackBerry should have BlackBerry Protect, get it now! | Follow me on Twitter | Bring Back BBM Music!

  • How do I use the same photo twice in a slideshow created in iPhoto'11?

    I created a slideshow in iPhoto'11 and would like to use the first slide also as the last slide.
    How can I use the same photo twice?

    Seems you have to duplicate the photo in your Library to add the same picture twice.

  • How do I repeat the same row more than once in report 10g

    How do I repeat the same row more than once in report 10g
    So I can print the bar code more than once
    in report;
    Edited by: user11106555 on May 9, 2009 5:50 AM

    GREAT THAN X MAN
    It is already working, but with the first ROW
    select ename from emp
    CONNECT BY ROWNUM<=5
    ENAME
    SMITH
    SMITH
    SMITH
    SMITH
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    BUT I want this result
    Item1
    Item2
    Item3
    to
    Item1
    Item1
    Item1
    Item2
    Item2
    Item2
    Item3
    Item3
    Item3

  • How can I retrieve the same figure twice in report?

    Hi guys,
    If we have the same selection twice in the same report, it only retrieves the figure once (see example below, were the same period has been chosen twice). Is there any setting I can adjust, so it will retrieve the figures for double-selected members also?
    Thanks,
    Dorthe

    Hi Dorthe,
    No issues in my system (BW 7.3, BPC SP12, EPM SP16 patch1):
    B.R. Vadim

  • Question about using multiple iPods on the same PC

    I've read the FAQs on this subject but I still have a couple of questions about multiple users with separate iPods using the same PC.
    I want to use my family's desktop (A new Gateway with Vista, if it matters) for my new iPod Classic, but my father already has an iTunes account on there for his iPod. I know I can create a new user account on the PC and move iTunes to a shared folder so that we can share music, but will this second account be able to purchase music from the iTunes store or am I going to have to switch between Windows User accounts to make purchases and then move new songs into my separate iTunes account via the shared folder? Will it be its own separate iTunes account (separate user name, separate credit card used, etc.) or will it just be a second library that's dependant on the first?
    I want to be able to have my own iTunes account, make my own purchases in it, and maybe occasionally share tv shows or something with my father.
    If this can't be done, would I be better off just creating new playlists for our two iPods from the same library, or creating a second library on my Father's account?
    Also, if I want to access things I've purchased from iTunes on this desktop in iTunes on my notebook, will I be able to?
    I hope that made sense.
    Sorry if these seem like silly questions. This will be my first iPod as I'm really excited about the 160gig and want to know if these things are possible.
    Thanks in advance for any help

    Hi, Wes.
    Congratulations on your new iPod Classic and Welcome to the Apple Discussions.
    For no particular reason, let's answer your last question first ...
    ... if I want to access things I've purchased from iTunes on this desktop in iTunes on my notebook, will I be able to?
    The iTunes Store operates on a one download per purchase policy so you will have to copy the purchases from one computer to the other and make sure that you authorize the laptop to play the songs.
    As to your first question ...
    ... will this second account be able to purchase music from the iTunes store or am I going to have to switch between Windows User accounts to make purchases ...
    Whatever XP User Account you are logged in to doesn't really matter. What's important is which Apple Account you sign in to ... yours or your Dad's or - if you had my Apple ID and password - The Mimico Kid's for that matter. You can sign in to any Apple Account on any XP User Account. Or any computer for that matter.
    Where the XP User Account comes into play is that it will determine where on your computer the purchases are downloaded. Files will be sent to the iTunes Music folder as specified in the iTunes Edit menu > Preferences > Advanced tab > General sub-tab. Default settings will have a different location for each User Account - C:\Documents and Settings\ user name \My Documents\My Music\iTunes - but if you've read this article in the Apple Knowledge Base, you will know you can change the location of the iTunes Music folder in each XP Account to a common location such as C:\Documents and Settings\All Users\Documents\My Music\iTunes.
    Post back if all this hasn't been as clear as mud and you need anything clarified.

  • Question about multiple resource objects using the same OID target account

    In Oracle Identity Manager 11g with OID connector as a target system.
    Is it possible to create multiple resources that use the same OID IT Resource. Each resource is responsible for provisioning certain OID attributes of the same OID account. For example 'OID User' would provision the basic account and a separate resource called 'Department1 User' would provision attributes not provisioned by OID User.

    Yes, definitely. Here is how it would work:
    - You would have to make sure that the resource OID User always gets provisioned first, so that the account exist when these additional attributes are being set for the user via the other resource Department1 User. You can do this with Resource Dependency in OIM.
    - Now for using the same IT Resource, just create the new form and in the IT Resource type form field, map the properties to the same IT Resource Definition, so when the Provisioning Process gets invoked it uses the same IT Resource instead.
    Thanks
    SRS

  • I have a question about multiple administrative accounts on the same computer.

    Let's say there are two users of the same computer. Each has his/her own separate admin account so they can log in under their own account. When you perform certain housekeeping functions on this computer like software updates, safari reset, cleaning up cache and cookies, virus scans and Time Machine backups, do you have to perform all of these functions for each admin account?

    JazzmanJohn wrote:
    do you have to perform all of these functions for each admin account?
    software updates, virus scans and Time Machine backups  - No
    Although deleting a virus infeced file in another admin account will present a small problem.
    safari reset, cleaning up cache and cookies, - Yes
    These things are stored in each user account, thus must be cleaned in each user account.
    For instance if you want to reset Safari or clean it's caches that will have to be done in each user account.
    Doing it for one doesn't do it for other accounts.
    However system cache cleaning and using some softwares to clean browser caches may use Sudo or "root" priviledges to access all accounts and OS X.
    For instance, you can try to see if OnyX will clean all the Safari accounts caches at once, but I doubt it will actually reset Safari in all accounts, might not get the cookies neither.
    https://www.macupdate.com/app/mac/11582/onyx
    Thing to keep in mind is, altought your Admin, your not Root. Only root has complete access to all files.
    Admin can use SUDO, which is a timed window of root access. Safari doesn't use SUDO, it's designed to function only in the account it's running in.
    So to reset Safari, it will have to be done from within that account, unless you know where the files are to be deleted, then you can use SUDO in Terminal.

  • [solved] question about two soundcards which use the same module

    Hi
    I have two external soundcards, an Edirol UA-25 and a MAudio Transit. Both use the snd_usb_audio kernel driver. When I only had the MAudio, I configured it to be soundcard number 2 with the following in /etc/modprobe/modprobe.conf
    options snd-usb-audio index=2
    Now I'd like to have one be soundcard number 2 and the other one soundcard number 3. The internal soundcard is number 0, my tv card is number 1, I don't want to change that.
    How can I do this?
    Last edited by Army (2011-08-26 16:31:10)

    Ok, works. For documention, here's what I did:
    If you have two (or more) soundcards, which use the same kernel module, this is what you need in your modprobe.conf (or call this file just like you want, it only has to be in /etc/modprobe.d and has to be called *.conf)
    options snd-usb-audio index=2,3 vid=0x0582,0x0763 pid=0x0074,0x2006
    This is what I have now. Index is the number of the card, e.g. you see those numbers in alsamixer when you press F6. The vids and pids you can get with
    lsusb -v|grep idVendor # this is for the idv
    lsusb -v|grep idProduct # this is for the idp
    Just pick the line which stands for the soundcard, put these ids into the *.conf file and you're done. Now it doesn't matter in which order you plugin the soundcards, they get the right index.
    Quite easy after all

  • Question about cropping multiple tracks at the same time

    Ok, here is the situation. My band jams reguarly, and I am recording 8 tracks concurrently.... each instrument gets their own mic/input.... typical band fare.
    The recording will last a solid 45-60 minutes before we break. In the meantime, there is plenty of downtime, and multiple songs.
    After the jam, I like to cut out the crap, bad takes, etc....
    I do this by editing the waveform of each track individually, selecting the 'good region'.... copying the section ... and pasting into a new track... I repeat this 8 times... once for each track....
    I then mute the original 8 tracks, move all the clips to timecode 0 and export to disk....
    Needless to say, this is very, very time consuming, and I would like some input about a better way to do this.
    Is it possible to select the same region across multiple tracks and copy/paste them into several new tracks? Or is it possible to define the 'playable region' of a larger region so that when I export, I am only exporting the region I am interested in?
    Ultimately, I want to produce an exported .m4a for each 'good take' which is nothing more than a subset of the larger 60 minute take....

    Have you tried selecting all tracks, then split at the beginning and ending of the "good take" then copy and paste it into a new GB file?

  • Need help in SQL Query: Update a row in a table & insert the same row into another table

    I want to update a row in a table say Table A and the updated row should be inserted into another table say Table B. I need to do it in a single SQL query and i don't want to do it in PL/SQL with triggers. And i tried with MERGE statement but its working with this scenario. (Note: I'm using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0).
    Thanks in Advance.

    Using Sven's code as an example, you could save the updated row in a sql plus variable. (also untested):
    SQL> var v_id number
    update tableA  
    set colB='ABC' 
    where colC='XYZ' 
    returning id into :v_id;
    insert into table A_History (ID, colA, colB, ColC)  
    select id, ColA, ColB, ColC  
    from tableA  
    where id = :v_id;   

Maybe you are looking for