Any way to use merge for mutliple tables w/ shared PK?

If you have multiple tables who share the same PK (or I should say the main table has a certain valye used as Primary Key and then multiple child tables use that PK as a foreign key), would merge be able to work for you?
in my case I have one source table, which is loaded by flat file and represents a flattened record of what would in my database be separated into multiple tables.
I need to update records from that source table where they exist (based on join of non-PK columns) and then insert where they do not exist. So I thought I could utilize the nifty merge command.
However I am quickly realizing this is not a standard use of merge which seems to be designed for going from one source table to one target tables which are roughly equivalent. But in my case I have one source table which has pieces going into table A, other pieces table B, etc... and all those tables share an ID.
So when I first merge into the main table I use a sequence to generate it's PK. But then the problem becomes, how do I then have this same PK used as the value for the FK in the inserts done by the following merge commands for this child tables?

trant wrote:
If you have multiple tables who share the same PK (or I should say the main table has a certain valye used as Primary Key and then multiple child tables use that PK as a foreign key), would merge be able to work for you?
in my case I have one source table, which is loaded by flat file and represents a flattened record of what would in my database be separated into multiple tables.
I need to update records from that source table where they exist (based on join of non-PK columns) and then insert where they do not exist. So I thought I could utilize the nifty merge command.
However I am quickly realizing this is not a standard use of merge which seems to be designed for going from one source table to one target tables which are roughly equivalent. But in my case I have one source table which has pieces going into table A, other pieces table B, etc... and all those tables share an ID.
So when I first merge into the main table I use a sequence to generate it's PK. But then the problem becomes, how do I then have this same PK used as the value for the FK in the inserts done by the following merge commands for this child tables?realize that everyone here speaks SQL
I could better understand what you have & what you desire if you post DDL for all tables
& then you explain what is desired using actual table & column names.
Simply put, I would not recognize any post SQL as being correct, since I do not understand the desired goal/results

Similar Messages

  • Is there any way to use a For Each Loop for each property of an User Defined Type?

    Is there any way to use a For Each Loop for each property of an User Defined Type? That would be very handy!
    Jorge Barbi Martins ([email protected])

    Alas, no, not in VBA.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Any way to use filter to exclude tables in navagation pane?

    Is there any way to use filter to exclude a set of tables from the table list in the navagation pane? I have a number of tables (15+) starting with the same prefix eg. AB123 that I would like eliminate from the list. They sort right to the top and I always have to scroll down, and go through the show more dialog to see the entire list.
    I am sure I'm missing something, but not sure what. Help Center has nothing to offer.
    Thanks
    Glenn

    This has been mentioned on the forum before - basically the need for more elaborate ways to filter (multiple conditions as well as 'not like'). It is on our list for future consideration, meaning post-production.
    -- Sharon
    Message was edited by:
    sbkenned

  • Any way to use connection for Ethernet if wifi not available?

    Going to place where there is only wired connection. Is there any way I can connect to Internet from my iPad?

    I use a Virgin mobile MiFi which allows upto 5 wireless connections which is basically a Sprint data access for no contract $50.00 /month fee unlimited, lower prices for limited duration/packet charges.
    A major decision when purchasing iPad mini WiFi-only vs Cell enable locked to AT&T (yes I know, but have an iPhone already with them).

  • I accidentally created an iCloud account using the wrong email address for my username - I already have an iCloud account with a different email address username. Is there any way I can merge these accounts?

    I just upgraded my MacBook from OS X 10.6.8 to Mountain Lion so that I could stream from my other devices (iPhone and iPad) to my MacBook.  After making it through the upgrade process, I realized that I used the wrong email address for my iCloud username when starting up on the MacBook.  My iPhone, iPad, and iTunes are under my Hotmail email address and I accidently used my Gmail email address for the MacBook.  Is there any way I can merge these two icloud accounts together? I tried changing my account information to add the other email address, but wasn't allowed because another account was using the name (duh).  If I can't merge them, how could I change the MacBook from the Gmail address to the Hotmail address so that all my devices are on the same icloud account?  It'd be nice if I could keep the free 5GB of storage that comes with my purchase of the software, but I'd rather lose the storage than not be able to stream.

    To change accounts on your Mac, go to System Preferences, sign out of the current account, then sign into the new account.  When you sign out of the current account it will delete synced data from your Mac.  Assuming your data (such as contacts, calendars, etc.) is in the other iCloud account, it will be synced to your Mac when you sign into this account.

  • Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Is there any way to use a MacBook Pro as a router to set up a wireless connection for XBOX live.

    Mac OS X 10.6 Help: Sharing your Internet connection

  • Is there any way to use a aunetreceive for a track within GarageBand?

    Is there any way to use a aunetreceive for a track within GarageBand?
    I have an application, Soundboard, which sends audio via the aunetsend plugin. I'd like to manage the output of this application within Garageband as a track. Is there any possible way to do this?
    Thanks

    Alas, no, not in VBA.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Any way to use cursor values inside other cursor by bulk collect?

    hi,
    Is there any way to use cursor get_tables value insdide loop get column if i am using bulk collect in both cursors?
    I tried a lot but i am nt able to do it.kindly help...
    create or replace procedure MULTIPLE_CURSORS_PROC is
    v_owner varchar2(40);
    v_table_name varchar2(40);
    v_column_name varchar2(100);
    cursor get_tables is
    select distinct tbl.owner, tbl.table_name
    from all_tables tbl
    where tbl.owner = 'SYSTEM';
    cursor get_columns is
    select distinct col.column_name
    from all_tab_columns col
    where col.owner = v_owner
    and col.table_name = v_table_name;
    begin
    open get_tables;
    loop
    fetch get_tables into v_owner, v_table_name;
    open get_columns;
    loop
    fetch get_columns into v_column_name;
    end loop;
    close get_columns;
    end loop;
    close get_tables;
    end ;

    hi there
    Refer this
    CREATE OR REPLACE PROCEDURE MULTIPLE_CURSORS_PROC
    IS
       TYPE scol IS VARRAY (10000) OF VARCHAR2 (32767);
       v_table_name    scol;
       v_column_name   scol;
       TYPE curtyp IS REF CURSOR;
       get_columns     curtyp;
       CURSOR get_tables
       IS
          SELECT   DISTINCT tbl.table_name
            FROM   all_tables tbl
           WHERE   tbl.owner = 'SYSTEM';
    BEGIN
       OPEN get_tables;
       LOOP
          FETCH get_tables BULK COLLECT INTO   v_table_name;
          FOR indx IN v_table_name.FIRST .. v_table_name.LAST
          LOOP
             SELECT   DISTINCT col.column_name
               BULK   COLLECT
               INTO   v_column_name
               FROM   all_tab_columns col
              WHERE   col.table_name = v_table_name (indx);
             FOR ind IN v_column_name.FIRST .. v_column_name.LAST
             LOOP
                DBMS_OUTPUT.put_line (v_column_name (ind));
             END LOOP;
          END LOOP;
          EXIT WHEN get_tables%NOTFOUND;
       END LOOP;
       CLOSE get_tables;
    END MULTIPLE_CURSORS_PROC;regards
    Hitesh

  • Any way to use a quick and dirty icon like cLabel in the quick tools toolbar?

    I am a javascript cut-and-paster with ability to cobble things together.
    In previous versions of Acrobat, I had tools that were added to the toolbar using the technique shown in this script:
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    That would create a toolbar button with the "icon" that read "Flatten" which is all that I needed.  I could click on it and it would flatten all pages in the document.
    I used this to create several different tools, all with different names and cLabels.
    This script still works in Acrobat XI (it adds the tool to the add-on tools list, and then I can add it from there to the quick tools toolbar).  The cLabel names show up in the add-on tools list, but not in the quick tools toolbar.  In the toolbar they all use the same generic icon (but they all work correctly).
    From reading in this forum I see that there is a way to create a custom icon but it does not look easy.  Is there any simple way to just have text appear as the icon as I used to do for earlier versions of Acrobat?
    Thanks.

    One further question...
    I found a code snippet somewhere online that attempted to deal with this issue.  That led me to this (failed) solution:
    this.importIcon("myIconFlat", "/D/J/CAD Standards/Stamps/Acrobat tools/flatten.jpg", 0);
    var flatIcon = util.iconStreamFromIcon(this.getIcon("myIconFlat"));
    app.addToolButton({cName: "MyFlattenButton",
       cLabel: "Flatten",
       oIcon: flatIcon,
       cEnable: "event.rc = (app.doc != null);",
       cExec: "flattenPages();"
    The problem there is that importIcon is not allowed from a folder-level javascript, apparently.  Would there be any way to use the importIcon part of this from the console and then cut and paste some output into the rest of the script?  Just looking for a way to get the icon into my script.

  • Is there any way to use a file transfer protocol to upload files to icloud?

    Is there any way to use a file transfer protocol to upload files to icloud?

    Unfortunately, no.
    You will need a 3rd party web host to upload your websites to. Depending on the version of iWeb you are using you have a couple of publishing options:
    iWeb ’09 (3.0.4) you can publish to an FTP Server or a local folder. ( With the built in FTP in iWeb you will end up with an address like “www.YourDomain.com/sitename/Home.html )
    iWeb ’08 you can publish your website to a local folder
    Basically all Web Hosting companies are iWeb-compatible.
    If you’re looking for a good hosting I would recommend IX Web Hosting I have been using them to host my own websites for several years now and that their customer support is awesome too.
    http://jeffnitschke.com/IXWebHosting.html
    http://jeffnitschke.com/wordpress/2012/06/how-do-i-move-my-mobileme-site-ix-web- hosting-blog/
    "I may receive some form of compensation from my recommendation or link."

  • Is there any way to use Internet Explorer on a Mac? I have one insurance company that I do business with that you must use internet explorer

    Is  there any way to use Internet Explorer on a Mac Book Pro? I have one company that I do business with that only uses Internet Explorer

    Internet Explorer is not available for Mac.
    But you can make Safari pretend to be Internet Explorer in some cases.
        Safari > Preference > Advanced
        Checkmark the box for "Show Develop menu in menu bar".
        "Develop" menu will appear in the Safari menu bar.
        Click Develop, move mouse down to "User Agent".
        Select Internet Explorer from popup on the rightside.
        After using Internet Explorer, revert back to Safari, doing the same routine.

  • Is there any way to use embedded commands in text to create pauses when using text to speech in iOS 5? You can do it in OS X by typing [[slnc 2000]] to get a two-second pause.

    Is there any way to use embedded commands in text to create pauses when using text to speech in iOS 5? You can do it in OS X by typing [[slnc 2000]] to get a two-second pause.

    Thanks for the reply Russ.
    Yes, I've considered adding titles and/or generators in the FCPX storyline, but this creates a need to render the entire timeline. As I'm juggling library locations and hard drive spaces I just didn't want to add a new render that will occupy a lot of space. It's also a bit of visual clultter for me, so my goal is to find the best workflow for adding this stuff on or after export.

  • Web gallery - any way to use IPTC data by itself beside metaset??

    Hi,
    I try to customize a template. I know that I can use the metasets to include the requested metadata - BUT is there any way to use other fields?
    so far I found
    PageTitle
    metavalue
    But even those spaceholders can't be used as i.e. the alt tag.
    Is there any way to get for example the Image Name (or other fields from the database) as a space holder??
    Appreciate your feedback.
    Thanks

    Hey, wow that was a quick reply
    Well all my photos are in Aperture, so I did think that I could grab the EXIF data from there and then place them in text boxes on my pages. I have hundreds of photos and doing it that way could take a long time! I was curious to see if there was something that would automate this for me within iWeb. For example, RapidWeaver allows you to check a tick box to display EXIF data under each photo. That's what im looking for within iWeb

  • Is there any way to raise alerts for stock outages in inventory

    Is there any way to raise alerts for stock outages in inventory

    You can use the Check Material Shortages attribute in the Org items under Inventory tab. Oracle will trigger shortage alert notifucations for the checked items. This works in the conjuntion with the Shortage Parameters defined at the Inv ORg level (these parameters are nothing but what business wants to consider as a shortage in WIP and OM). You can notify the cmp planner/buyer , assy planner/job creator..

  • Is there any way to use RUN button to deploy the application and open IE...

    Hi
    Thank you for reading my post
    i used to use Run button to compile / deploy and run (opening the browser to project context path) .
    i want to know is there any way to use RUN button to deploy an application to standalone OC4J and opening browser?
    I know that we can define ear or war deployment profiles and use them to deploy the application to stand alone server , but i want a single click solution.
    thanks

    Hello,
    Try disabling graphics hardware acceleration. Since this feature was added to Firefox, it has gradually improved, but there still are a few glitches.
    You might need to restart Firefox in order for this to take effect, so save all work first (e.g., mail you are composing, online documents you're editing, etc.).
    Then perform these steps:
    *Click the orange Firefox button at the top left, then select the "Options" button, or, if there is no Firefox button at the top, go to Tools > Options.
    *In the Firefox options window click the ''Advanced'' tab, then select "General".
    *In the settings list, you should find the ''Use hardware acceleration when available'' checkbox. Uncheck this checkbox.
    *Now, restart Firefox and see if the problems persist.
    Additionally, please check for updates for your graphics driver by following the steps mentioned in the following Knowledge base articles:
    * [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]
    * [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    Did this fix your problems? Please report back to us!
    Thank you.

Maybe you are looking for

  • MC_UPDATE_VMVA  in Ecc 6.0 upgrade

    Hi,   We are in process of upgrade from 4.7->Ecc 6.0 , we are stuck in Tabim_post phase,please check the log below.   We had run the program SAPMAC0 to generate the functional_module still not possibule. I am logging with ddic user in 000 client, whe

  • New laptop wont play any of itunes.

    i have a new laptop. i did the step-by-step advice on apple help website to move my itunes library to my new laptop. at first it was only importing 300 of my 2000 songs. now it has imported all the names into itunes. but when i click on it to play or

  • SQL2005 collation error

    Hi gurus i am running sapinst  installing sap 47 on sql 2005 server and iam getting  this error : Wrong server collation :J2ee installatin requires SQL_LATIN_GENERAL_CP850_BIN collation. I have checkek there is a note but it seems its applying to SQL

  • How to Write Path to Exclude Specific Folder From Scanning in Endpoint Antimalware policy

    Dears, I have configured endpoint protection antimalware policy to make scanning windows servers, and I have some specific folders which I need excluded from scanning because of they are critical folders, so, when I wants to excluded the folder, how

  • Onload not working after update to 3.6.14

    I've been creating a new web page and have "onload" in the body tag, which resets all checkboxes in a form. It was working fine when I reloaded the page, while I was using Firefox 3.6.13. But then I updated to Firefox 3.6.14 yesterday or the day befo