What PL/SQL should I use?

I need to:
1. Grab distinct combination of values from table A,
2. Check to see that I don't have those records in table B already
3. If a record exists in B, don't insert
4. If a record doesn't exist, insert.
What should I use? Sounds to me like a trigger job, but I read somewhere on the forum that triggers cannot check for dupes.
Table B's PK is a sys-generated value that I get out of a separate sequence/trigger.
Can someone, please give me direction?
Thanks,

I'm not sure why you'd need PL/SQL at all here... Seems like a pretty straightforward INSERT statement along the lines of
INSERT INTO b ( list_of_columns )
  SELECT list_of_columns
    FROM a
   WHERE NOT EXISTS(
      SELECT 1
        FROM b
       WHERE a.key = b.key )or
INSERT INTO b ( list_of_columns )
  SELECT list_of_columns
    FROM a
  MINUS
  SELECT list_of_columns
    FROM bDepending on your data (particularly the presence of NULLs), you may need to tweak this slightly, but it sounds like you can use a single SQL statement.
Justin

Similar Messages

  • I would like to move 2 users to creative cloud, but maintain all the other users (myself included) on CS5. Can I still get the reduced monthly rate? What serial number should I use?

    I would like to move 2 users to creative cloud, but maintain all the other users (myself included) on CS5. Can I still get the reduced monthly rate? What serial number should I use?

    Hi Thomasjewell,
    Yes you can avail the discounted prices even you are upgrading the product just for two users. You can use the serial number for your Creative Suite 5 product.
    You can follow the link: https://creative.adobe.com/plans in order to purchase Creative Cloud for Teams product.
    Let me know if it works or not.
    Thanks,
    Ratandeep Arora

  • I'm showing a video on a wall that's 3646 x 768 px. What project dimensions should I use to best fit the space?

    I'm showing a video on a wall that's 3646 x 768 px. What project dimensions should I use to best fit the space?

    Try this : http://library.creativecow.net/payton_t/FCPX_Custom-Resolution-Timelines/1
    Switchie2

  • HT201376 How do I go about unlocking a recovery HD? Also I need to know what disk image should I use when trying to restore a failed(erased) disk in DU?

    Also I need to know what disk image should I use when trying to restore a failed(erased) disk in DU?

    You need to plug it into your computer running iTunes and restore it. Have you tried that? If so, what happened?

  • I want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    want to create fillable PDF that can be used by many people running on both MAC and PC.  What Adobe product should I use?

    Hans-Gunter
    Thanks so much.  I downloaded Acrobat XI.  It's been "extracting" for the past 30 minutes (even with a fast wi-fi).  Hope this is not a problem.
    Anne

  • What pdf tag should I use for footnotes?

    I get involved in generating fully accessible tagged pdf's for asisstive technologies and the like. I have a doc in InDesign which uses footnotes. When I tag the document, should I map the footnotes (paragraph) style to a particular predefined pdf tag (http://www.alistapart.com/d/pdf_accessibility/PDFtags.html) and if so which one? P, STORY, NOTE....? I'm not sure and can't find any reference out there to help me.

    offtheroad wrote:
    What instrument area should I use for pulling in iTunes files to edit together, Voice, guitar, ...
    drop the files into a blank area of the timeline and GB will create a track for the files. if you want to do it manually, create a New Basic Track

  • HT201788 What speed disks should i use in an Apple Superdrive

    What speed disks should i use in an Apple Superdrive?
    Thanks

    It matters little. The slower the burn speed, i.e. 2x or 4x, the better the burn.
    What is important is the brand of media: most of here recommend Verbatim, Maxell and Taiyo Yuden.

  • What chat service should I use?

    I want to chat with someone on a pc/webcam. Should I use YahooChat? I want to have both audio and video chat. The PC is not a .mac member, so I can't use iChat, right?
    Please advise on what I should try. Thanks.
    MacBook   Mac OS X (10.4.8)  

    Hi
    Try Skype to A/V with PC.
    Mac version http://www.skype.com/intl/en-gb/download/skype/macosx/25beta.html
    PC version http://www.skype.com/intl/en-gb/download/skype/windows/helloagain.html
    Tony

  • What sequence setting should I use for a High Quality Video Montage?

    I am about to start a new project for a client using photographs only.  I have two questions:
    1.  What should I use for the sequence settings?  Should I edit with a HD sequence setting? 
    2.  I am going to scan the pics myself.  What Pixel or resolution is appropriate to get the best quality?  I'm looking for wide screen 16 x 9, not 3 x 4.

    First, decde how you are going to deliver this production to your client. Then tell us what that delivery medium will be. Then we'll have some advice for you.
    See the section in the FCP manual on using still images. You need to understand that in video there are only pixels, no dots per inch or lines per inch. Those terms are meaningless in video. You wil sand at a size in raw pixels that is only slightly larger than your delivery format.
    bogiesan

  • What connection-cable should I use to watch films from my iPod on my TV

    What connection should I use to see films from my ipod on my tV?

    Hi there sonofmyfather,
    You can use the Apple Composite AV Cable if you want to connect your iPod Classic to your TV. Take a look at the product page below for more information.
    Apple Composite AV Cable
    -Griff W.

  • What email program should I use?

    I have Safari 1.3.2 which I assume is the final upgrade for 10.3. I changed my browser to Firefox because of some of the problems with Safari. I was a long user of Netscape, including their email program. I want to keep Panther as my operating system. Should I use the Safari 1.3.2 for email? Want would you recommend for email, something different?

    Hi again,
    Yes, the Navigator Composer/Mail bundle... it's a good one if you like it. Has a lot of extra's to it. If you want to check out others, have you tried the one that comes with MacOSX? It's simply called Mail. It's the one I use now... it's simple, has some extra's and is all I need. Some like Microsoft Entourage which comes with the new Mac as a trial and is bundled with the Microsoft Office Suite... if you have that bundle. I find it has much more then I want to be a simple program, maybe some office types could use all that stuff, but I don't.
    Camino is just a browser. SeaMonkey is the Mac version of Netscape... it has all the elements of Navigator... composer, mail, browser and with all the same icons... it is just more Mac-Friendly then Navigator can be. This one would be worth a look if you are used to Netscape (since Netscape is now without support and has been acquired by AOL), and SeaMonkey is still going and improving.
    A stand alone mail program called ThunderBird on the Mozilla web-site is also an alternative if you want something different to try out. I have given it a look, but again it has too many bells and elements for my simple use style.
    So, I have grown used to Mail which is a natural for this Mac... works well, simple and yet some bell's to enhance with. But, you, can now give some others a look/feel and see what you think.
    Enjoy

  • What File Extension Should I Use

    I'm new to websites.  I have been adding documents to our organizations website (thesoba.com).  Usually I will use pdf documents, but one of the documents (points) is taking a long time to load. That document keeps getting bigger and bigger each month.  I think that it's loading about 18 pages.   I know I have a lot of files on the website that I don't use and need to clean those up.  We have sponsor logo's and past history that we want to keep and possibly use in future years.  I need to those to a backup or another folder.  What is the best way to know what files are currently in use on the website.
    Thanks
    Mike

    squatch97401 wrote:
    The files are usually pdf which I have scanned.  I probably did not optimize for the web.  I do have Acrobat pro so I can do just about anything with these files.  Some of these files come from our bowling program.  I'm new to this so should I use another file type to post on the web.
    First off ignore that other guy.  Looks to be a new spam bot.  They appear every so often on forums.
    More than likely if they are just from a scanner they are not optimized.  I'm not sure if PDF is right or wrong.  Best way to tell is to look at the type of data you are trying to store.  If you show me one of the PDFs I would be willing to look at it for you and see whether it is something with optimization or if there is a better way to store the data.  If you are worried about publicly posting one of the documents, we could work through email (I would provide address through that).

  • What class / API should i used ?

    Hi, all
    what api should i used when i want to know present time (hour-minute-second) or date... i've used :
    GregorianCalendar kal = new GregorianCalendar();
    int year=kal.YEAR;
    instead i got year is 1 ??? (for present year !!) ...
    it does the same as hour and minute... i dont have the exact time like the time in my win task bar.. plzzz help me...

    This should help:
    *  Calendar Demo (by Sun, with modifications)
    import java.util.*;
    public class CalendarDemo {
        public static void main(String[] args) {
    // get the supported ids for GMT-08:00 (Pacific Standard Time)
            String[] ids = TimeZone.getAvailableIDs(-8 * 60 * 60 * 1000);
            // if no ids were returned, something is wrong. get out.
            if (ids.length == 0) {
                System.exit(0);
    // create a Pacific Standard Time time zone
            SimpleTimeZone pdt = new SimpleTimeZone(-8 * 60 * 60 * 1000, ids[0]);
    // set up rules for daylight savings time
            pdt.setStartRule(Calendar.APRIL, 1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
            pdt.setEndRule(Calendar.OCTOBER, -1, Calendar.SUNDAY, 2 * 60 * 60 * 1000);
    // create a GregorianCalendar with the Pacific Daylight time zone
    // and the current date and time
            Calendar calendar = new GregorianCalendar(pdt);
            Date trialTime = new Date();
            calendar.setTime(trialTime);
    // Change month numbering to 1-12
            int monthNumber = calendar.get(Calendar.MONTH)+1;
    // begin output
            System.out.println("Current Time");
    // print out a bunch of interesting things
            System.out.println("ERA: " + calendar.get(Calendar.ERA));
            System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
            System.out.println("MONTH: " + monthNumber);
            System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
            System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
            System.out.println("DATE: " + calendar.get(Calendar.DATE));
            System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
            System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
            System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
            System.out.println("DAY_OF_WEEK_IN_MONTH: " +
                calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
            System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
            System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
            System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
            System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
            System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
            System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
            System.out.println("ZONE_OFFSET: " +
                (calendar.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000)));
            System.out.println("DST_OFFSET: " +
                (calendar.get(Calendar.DST_OFFSET) / (60 * 60 * 1000)));
            System.out.println("Current Time, with hour reset to 3");
            calendar.clear(Calendar.HOUR_OF_DAY);
            // so doesn't override
            calendar.set(Calendar.HOUR, 3);
            System.out.println("ERA: " + calendar.get(Calendar.ERA));
            System.out.println("YEAR: " + calendar.get(Calendar.YEAR));
            System.out.println("MONTH: " + calendar.get(Calendar.MONTH));
            System.out.println("WEEK_OF_YEAR: " + calendar.get(Calendar.WEEK_OF_YEAR));
            System.out.println("WEEK_OF_MONTH: " + calendar.get(Calendar.WEEK_OF_MONTH));
            System.out.println("DATE: " + calendar.get(Calendar.DATE));
            System.out.println("DAY_OF_MONTH: " + calendar.get(Calendar.DAY_OF_MONTH));
            System.out.println("DAY_OF_YEAR: " + calendar.get(Calendar.DAY_OF_YEAR));
            System.out.println("DAY_OF_WEEK: " + calendar.get(Calendar.DAY_OF_WEEK));
            System.out.println("DAY_OF_WEEK_IN_MONTH: " +
                calendar.get(Calendar.DAY_OF_WEEK_IN_MONTH));
            System.out.println("AM_PM: " + calendar.get(Calendar.AM_PM));
            System.out.println("HOUR: " + calendar.get(Calendar.HOUR));
            System.out.println("HOUR_OF_DAY: " + calendar.get(Calendar.HOUR_OF_DAY));
            System.out.println("MINUTE: " + calendar.get(Calendar.MINUTE));
            System.out.println("SECOND: " + calendar.get(Calendar.SECOND));
            System.out.println("MILLISECOND: " + calendar.get(Calendar.MILLISECOND));
            System.out.println("ZONE_OFFSET: " +
                (calendar.get(Calendar.ZONE_OFFSET) / (60 * 60 * 1000)));
            // in hours
            System.out.println("DST_OFFSET: " +
                (calendar.get(Calendar.DST_OFFSET) / (60 * 60 * 1000)));
            // in hours
    }

  • Satellite Pro A100 PSAA3E: What WLan driver should I use?

    What wireless software should i download to make my built in wireless work.
    I have downloaded almost all of them but they install and i see no wireless there :S
    Help please?

    Hi
    The Satellite Pro A100 were equipped with the different WLan cards; two different Wlan cards are possible; Intel and Atheros.
    All necessary WLan drivers can be found either on the Toshiba European driver page or on the Toshiba WLan portal.
    http://aps.toshiba-tro.de/wlan/
    Check both drivers. One of them will work for sure!
    Regards

  • If I'm using a Canon S110 what sequence preset should I use to get the best high def results?

    Also if I'm uploading these videos to YouTube, should I use the YouTube preset in exporting the video? Will that make my video look high def as well?

    For editing, The NEW ITEM process will ensure that your editing sequence matches your video file
    CS5-thru-CC PPro/Encore tutorial list http://forums.adobe.com/thread/1448923 has a link to learn about the NEW ITEM process
    YouTube Exporting http://forums.adobe.com/thread/1451877?tstart=0

Maybe you are looking for

  • Calling report with parameter form using frmrwinteg

    Hi, I am calling a report with a parameter screen from a form and am using the frmrwinteg bean. This works fine on our test application server but, when moved onto our production application server, the database logon screen is presented after pressi

  • How do I get the download for Lion OS on my iMac if I don't have the App Store app?

    I stopped by the Apple Store and they told me that they can't sell me Lion OS in the store.  Since I have an older iMac with out the App store App, they said that I need to contact Apple Support.  But do I have to do that via phone or can I somehow e

  • Setting profile parameter icm/HTTP/error_templ_path

    Hi, I have a SAP Enterprsie Portal installation with only java stack (no abap stack), i want to set a profile parameter icm/HTTP/error_templ_path, please direct me how to set this parameter,  also, i need this parameter to be applicable for the SAP w

  • Picture frame stroke effects and instant alpha to book projects created in aperture?

    Is there a way to add do the following in aperture?  Picture frame effects Reflection effects Instant alpha. Seems funny that I can find it in keynote, pages and iWeb, but not in this pro software.

  • GetResourceAsStream and Weblogic 6

    Hi all, I'm interested in loading some error messages from a file in Weblogic 6, and caching the result. One thing I note about this brave new world of EAR packaging is that there's really nowhere to put extra files of your own choosing. So I figured