TWO MASTER AND ONE DETAIL TABLE

HI,
I HAVE TWO SEPARATE MASTER TABLE WITH SAME DETAILS I MADE ONE DETAIL TABLE REFERENCES BOTH OF THE MASTER TABLES(BOTH MASTER HAVE SAME PRIMARY COLUMN NAME) , BUT WHEN INSERT RECORD IN DETAIL IT GIVES ME ERROR THAT PARENT KEY NOT FOUND(ALTOUGH I HAVE INSERTED MASTER DATA IN ONE MASTER TABLE BUT NOT THE SECOND ONE AND IT'S NOT POSSIBLE TO INSERT SAME DATA IN SECOND MASTER TABLE), WHAT I WANT TO ASK THAT HOW IT'S POSSIBLE TO USE SAME DETAIL TABLE WITH DIFFERENT MASTER TABLES. STRUCTURE OF BOTH OF THE TABLES ARE BELOW.
MASTER ONE
SQL> DESC INCIDENT
Name
REF_NO
INC_TYPE_CODE
DISTRICT_CODE
KV33
KV11
INC_DATE
EMERGENCY
TRIP
CAUSE_TYPE_CODE
SUB_CAUSE
INC_DESC
REASON
OPER_SEQ
REM_RECOM
CON_COMP_CODE
CTRL_ENG_APP
DELAY_OCCURED
DELAY_REASON
SECOND MASTER
SQL> DESC SWITCHING
Name
REF_NO
INC_TYPE_CODE
JOB_CODE
DISTRICT_CODE
KV33
KV11
CON_COMP_CODE
INC_DATE
INT_NOTICE_ISSUE
INTERRUPTION
REM_RECOM
CTRL_ENG_APP
WORK_DESC
DETAIL TABLE
SQL> DESC INTERP_DETAIL
Name
REF_NO
INC_TYPE_CODE
FEEDER_CODE
VOL_LEVEL
START_DT_TIME
GRID_CODE
END_DT_TIME
LOAD_AMP
LOAD_MW
LOSS_MWHR
THANKS IN ADVANCE.
KHAWAR

Hi,
When you establish the relations using the references, then oracle will look for the parent key in both the parent tables. Either you need to remove the foreign keys or change your db design to add one more table and have one-one parent child relationships.
HTH
Regards,
Badri.

Similar Messages

  • Two fact and one dimension table

    Hi folks
    i am new to this field ( 3 months ), my TL has given me one task i have to finish it up today itself, Can anyone one give me some idea how to implement
    req. The req is
    1. there are 2 fact and one dimension table is there, i have to create reports on Quaterly and monthly basis by using one dimension table.
    Can any one tell me what all are the steps in need to follow
    2.What is standalone and integrated systems?
    Regards
    Reddy

    Hi
    If u r having mapping keys for quarter level n monthly level then create a Alias for the dimension table.Use the original dim table for quarter level mapping and the alias dim for monthly level.
    Thanks
    Don

  • Two masters and one detail block

    Hello All,
    I have three tables Person_master, Addr_master, person_address_link.
    Person_master -
    Person_id number (8), fname, lname and other fields,
    Addr-master -
    Address_id number(9), addr_1, addr_2 and other fields
    Person_address_link
    Person_id, Address_id, Module_id.
    ...person_master and address_master are not related to each other but
    they are related to each other in person_address_link detail block...
    ...how to design this form...
    ...also i want to take care of the cases when person,his addresses and
    their link exists, and in addition want to add new address, whose link
    will then be stored in person_address_link...

    Can
    block 1 = Person_master
    block 2 = Person_address_link
    block 3 = Addr-master
    Block 1 relates to block 2 via Person_id
    and block 2 relates to block 3 via Address_id
    Regards

  • Problem with a master tree table and its detail table

    Hello,
    I have a master treetable showing on a page and a separated detail table below the treetable on the same page.
    To make the things clear, three tables are involved here: one master and one detail table to compose the treetable, and another detail table for the current selected row in the treetable.
    Things usually work fine when operating on the detail table. However, if I create or delete some rows from the detail table and press Rollback, some unwanted behaviour happens.
    In facts, on Rollback, both the master treetable and the detail table are redrawn on the page.
    However, once refreshed, despite the current selected row in the treetable still appears as the one before clicking Rollback (suppose not the first one), the detail table always correspond to the first row of the master treetable.
    Is there a way to either make the current selected row the first one the master treetable, or (preferred) to make detail table reflect the visible current selected row in the treetable?
    thanks

    jabr,
    ok . i will go through
    but if u don mine here john n timo says for me. pls check it.
    on rollback
    create insert options
    Edited by: Erp on Oct 12, 2011 5:14 AM
    Edited by: Erp on Oct 12, 2011 5:15 AM

  • More than one Detail table in the Master Detail forms!

    Hi,
    I need to have more than one Detail table in Master Detail Forms.
    I want to see the details of the rows of the first Detail table in the Second Detail table. Please guide me to do this.
    Sincerely yours,
    Mozhdeh

    You can do one of two things
    1) Depends on the nature of your data model. I was able to manage many to many
    relationships using views and instead of triggers. This solution is somewhat complex but can work in certain situations.
    2)Works for situations where master record exists. create a page with mulitple portlets syncronized on some related key.
    create the following package to use on the md forms to place on the one page to be rendered.
    -- this package will facilitate the storage and retrieval of keys used by the related forms.
    create or replace package session_var
    IS
    session_parms portal30.wwsto_api_session;
    g_domain varchar2(2000) := portal30.wwctx_api.get_user;
    function get_id (id in varchar2) return number;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    END SESSION_VAR;
    create or replace package body session_var
    IS
    --pkg body
    function get_id(id in varchar2) return number is
    l_store_session portal30.wwsto_api_session;
    l_id number;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_id := l_store_session.get_attribute_as_varchar2( p_name => id);
    return l_id;
    end get_id;
    PROCEDURE SET_ID
    (ID in VARCHAR2
    ,p_val in VARCHAR2
    ,P_URL in VARCHAR2
    IS
    l_store_session portal30.wwsto_api_session;
    begin
    l_store_session := portal30.wwsto_api_session.load_session(
    p_domain => session_var.g_domain,
    p_sub_domain => 'your domain');
    l_store_session.set_attribute(
    p_name => id,
    p_value => p_val );
    l_store_session.save_session;
    * Redirect to the page using p_url;
    portal30.wwv_redirect.url(P_URL);
    end set_id;
    END SESSION_VAR;
    --the form master detail form, section  before display page enter the following code and publish as portlet.
    declare
    l_fs varchar2(4000);
    l_s varchar2(4000);
    v_con_id number;
    begin
    v_con_id :=rfq.session_var.get_id('CON_ID'); -- primary key and key used to relate details
    p_session.set_shadow_value( p_block_name => 'MASTER_BLOCK',
    p_attribute_name => 'A_CON_ID', -- attribute on form related to primary key
    p_value => '= '|| v_con_id,
    p_language => portal30.wwctx_api.get_nls_language ,
                   p_index => 1
    l_fs := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_FORM_STATE');
    l_s := p_session.get_value_as_varchar2(p_block_name => 'MASTER_BLOCK', p_attribute_name => '_STATUS');
    if l_fs = 'SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    if l_fs = 'QUERY_AND_SAVE' and l_s is null then
    WWV_MASTER_GENSYS_1(p_block_name => p_block_name,
    p_object_name => p_object_name,
    p_instance => p_instance,
    p_event_type => p_event_type,
    p_user_args => p_user_args,
    p_session => p_session);
    p_session.save_session;
    end if;
    exception
    when others then
    PORTAL30.wwerr_api_error.add(PORTAL30.wwerr_api_error.DOMAIN_WWV,'app','generic','onLink', p1 => sqlerrm);
    raise;
    end;
    --then create other md forms and publish as portlets in a similar manner.
    -- create a form (form_session_vars) to call procedure session_vars and place the following code in the
    addiontional pl/sql tab
    WWV_GENSYS_1(
    p_block_name => p_block_name ,
    p_object_name => p_object_name,
    p_instance => p_instance ,
    p_event_type => p_event_type ,
    p_user_args => p_user_args ,
    p_session => p_session);
    --then create a page and place the md forms created above as portlets on the page.
    --create a link and target the form_session_vars and in the link target inputs
    enter the values for your user parameters
    id= CON_ID --"your primary key name"
    p_url= url/page/"your_page"
    --finally create a report (QBE or standard).
    in the column formation section use the link created earlier to direct the user to the target page.
    How it works.
    When the link is selected the form_session_Var is called and automatically runs setting the primary key values
    in the user session store. The step is required or the resulting page will not render properly. Then the user is redirected to the page where the portlets are rendered. The portlets start rendering, the before display page calls the session vars package to retrieve the key and put the form into query_update mode returning the data.
    The portlets finish in query_and_save mode with details in update mode, the allowable insert, delete and none actions will be available for the details.
    benefits: The session_Var package code is resuable as well as the form form_session_Var and the link. passing the key name and values are done at the report level and detailed in the report links. the md forms will need to reference their related keys.

  • Multiple 'logical joins' between a fact table and one dimension table

    It appears that one cannot create multiple ‘logical joins’ between a fact table and one dimension table in OBIEE using the Oracle BI Administration Tool. For example, considering a Business Model with a dimension table TIMES and a fact table FACT containing START_TIME and END_TIME, we would like to create separate logical joins from FACT to TIMES for the START_TIMEs and END_TIMEs? Obviously, the underlying foreign keys can be created, but as far as I can tell the Oracle BI Administration Tool doesn’t support this. The workaround would be to replicate the TIMES table, but that’s ugly.
    I seek an alternative approach.

    Try this. Create an two aliases for the TIMES dimension (Start & End) in the Physical Layer and then remove foreign key to the "Parent" Times dimension. Create the Foreign Key in the Physical Layer to the new aliases and then create the complex joins in the BMM Layer to the new aliases as well. This will allow you to present both dates within the same table in the Presentation Layer. Not the most elegant solution but it works.

  • If you registrate one Apple ID for each iPhone/iPad, you'll get 5GB on iCloud for each Apple ID, right? I have two iPhones and one iPad  with the same Apple ID, why can't I get 5 GB fo each of them?

    If you registrate one Apple ID for each iPhone/iPad, you'll get 5GB on iCloud for each Apple ID, right? I have two iPhones and one iPad  with the same Apple ID, why can't I get 5 GB fo each of them?

    Actually, everyone missed one point, when a device is priced, the cost of icloud storage space for that device is also included in it that is why they are able to give you 5gb each for each user ID, in nutshell there is nothing free coming with apple device purchase, it is paid for.  What they are trying by giving only 5gb per user ID irrespective of the number of devices used is pure broadlight looting, they take money from you when you buy each device and give you nothing, This is a case of goods and services bought but not fully deliverd ie apple can be suied for discreminatory treatment towards it's users. I wonder why no one tried this yet in America where everyone sue everyone for petty things..... there is no one to take up this issue? . if tim got any love for the guys who shell out money for the devices his company makes, he should be implimenting this as priority before someone wake up from sleep and sue him.

  • HT204053 I have two iPads and one apple ID. How can I FaceTime to/from each iPad? Do I need to set up a second apple id or is there a way around this?

    I have two iPads and one apple ID. How can I FaceTime to/from each iPad without creating a new apple Id. Anyone know a way around this I.e trying to FaceTime 2 IPads that have the same apple id associated with them?

    Have a look here...
    setting-up-multiple-ios-devices-for-messages-and-facetime.html

  • A Tale of Two iPhones and One iTunes

    So this little problem has plagued us for years... nearly three to be more precise.  We have two iPhones and one PC.  Wife syncs contacts with GMail and I sync contacts with Outlook.  Funny thing was that the tab for contact sync would not 'stick' with the phone... if I synced mine first, when I plugged hers in it would still be setup for Outlook.  Or if I changed it to Google for her and then plugged mine in it wouldn't remember my phone wanted Outlook and would sync with Google.  I gave up trying to get it working and setup a seperate profile on the PC for my wife that really was only used for her to sync her phone.  The only drawback we could see was we couldn't have a single repository for apps and I had to add music to libraries twice (one for each profile on the computer). 
    Well, now that we're on the 4S I thought I'd see if iTunes has evolved since 3 years ago when I gave up.  I uninstalled all Apple applications and loaded the latest iTunes.  The cool part of iOS 5 and the new iTunes is we don't have to connect phones any more   So now both phones show up at the same time.  I can toggle through all the tabs and see how they differ... different sets of applications are selected, different photo options, music options, etc.  EXCEPT the tab with contacts.  If I set her phone to google, my phone changes too.  I set mine back to Outlook and hers changes to Outlook.  We've mixed and matched contacts several times trying to get them to stay in tune and that is a huge PITA to clean up. 
    I tried the Genius bar.  The Genius answer was that we should probably do a restore on the phone.  I asked him to help me understand how restoring one phone would solve a problem that existed across 4 phones (two 3G's and two 4S's) and untold versions of iTunes over three years.  He just insisted that we probably need to do a restore on the 4S.  You know, because that would clearly explain the problem we also had on the 3G.  His backup plan was to call Apple support.
    So before I submit a ticket to Apple, anyone else able to confirm this limitation?  I've checked with my friends and the ones that have iPhones don't sync their contacts anywhere.  iCloud will help but we use XP and the PC software requires Vista or better so for now we're still unable to sync our contacts to our PC.
    Thanks!
    david

    On your wife's phone, when you said you've done a restore, was that a restore from backup or as a "new" device? I would suggest deleting the .ipsw file/files on your computer, connecting your wife's phone and restore as "new". When finished, DO NOT SYNC, rather eject the phone and test, verify that all is working correctly. If so, connect her phone & sync her content back.
    The .ipsw file is located here, delete all you find, there should only be one:
    ~/Library/iTunes/iPhone Software Updates
    If this works, under preferences, devices, in itunes, delete her backups, as they are most likely corrupted.

  • TS3367 I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling m

    I have two IPhones and one IPad all with the same Apple ID. I can call facetime between the two IPhones, but I cannot call the IPAD from either of the IPhones and when I call my IPhone from the IPad it rings my wife's IPhone after briefly calling mine.

    Each device needs a separate address. Use an email address (gmail.com) on the iPad.
    Using FaceTime http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90
    For non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
     Cheers, Tom

  • I have two iPads and one iPod Touch and they are using iTunes on the same computer.

    I have two iPads and one iPod Touch and they are using iTunes on the same computer. I have not been able to backup the second iPad. Is there a reason this is happening? iPad one is an iPad 1 and the second is an iPad 2 not sure if this has something to do with it. I just tried to upgrade to IOS 5 and when it went to back up it gave me an error code (-5000). I tried to back up using iTunes and it told me that my backup was corrupted and to delete it and try to back up again. When I went into the device portion where I was instructed to go to delete the backup I found that there was no backup for my iPad just the iPad 1.
    I have synced many times and all of the apps, podcasts, music, etc... show up in iTunes, and iTunes recognizes that is is the second iPad but there is not a backup for it.
    Any Ideas?

    Read this:  How to use multiple iPods, iPads, or iPhones with one computer, http://support.apple.com/kb/HT1495

  • ICloud - have two iPads and one Macbook and want to sync reminders on all three

    iCloud - have two iPads and one Macbook and want to sync reminders on all three. I have managed to get the Macbook and one iPad to sync, but wjat about the other iPad?

    First check that all your settings are correct, that reminders syncing (calendars on a computer) is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
    Make sure the reminders you are adding are added to your 'iCloud' account and not an 'On My Mac', 'On My Phone'  or other non iCloud account (you can do this by checking in accounts on an iOS device by tapping the icon with three lines in the top left corner of the screen, or the right side panel by clicking on the small triangle to the right of the word 'Reminders' in iCal on a computer), non iCloud reminders will not sync.
    If you are sure that everything is set up correctly and your reminders are in the iCloud group, you might try unchecking reminders syncing (calendars syncing on a computer) in the iCloud settings, restarting your device and then re-enabling notes syncing.

  • I have two iPads and one is connected to the internet but my other iPad was connected then was not and since then I have not been able to add my internet back onto my iPad it only says cannot connect to the server any help would be great thanks

    I have two iPads and one is connected to the internet but my other iPad was connected then was not and since then I have not been able to add my internet back onto my iPad it only says cannot connect to the server any help would be great thanks

    If you are having WiFi problems it is necessary to isolate whether the problem is with your network or your iPad. Note: Do NOT consider your network to be blameless if some other devices can connect to it.
    First, test your iPad on some other WiFi networks: a friends, Starbucks, Barnes & Noble, etc.
    If it works well there then the problem is probably with your network. Try restarting your WiFi router by removing power for 30 seconds. If that does not help check for a firmware update for your router. If none exists which corrects the problem consider replacing the router.
    If your iPad does not function well on other networks it possibly has a hardware problem. You could try Settings > General > Reset > Reset Network Settings to see if that corrects the problem. If not, contact Apple Support or visit an Apple store for evaluation. They can provide a replacement if your iPad is bad.
    If you need more help please give the make, model, and version of your WiFi router and how you have it configured.

  • MM_SPSTOCK Archive Batch Master and Stock Relevant tables - Display options

    Hello,
    We are archiving Batch Master and Special Stock tables. We have batch configuration set up at material level.
    We have realised SAP does not provide a infostructure to display through SARI archived batches. Also read program MMREO210 is not very elegant and required the archive session to display further information.
    We know that this object allow to archive partially: stock level (MCHB), plant level (MCHA) and finally if all dependencies are okay, batch master (MCH1).
    Can we display archived batch data using any standard SAP transaction? As QA03 for Archived Lots or similar.
    How should we create the infostructure for SARI access? MCH1-MCHA mapping? We are having problems when only MCHB entry is archived.
    We are interested at least in a list of material / batch / plant archived with production date, SLED... key batch master info mainly.
    Thanks a lot,
    Manuel Perez Lombard

    Not much available in standard.
    report MMREO210 and  MMREO221 (tcode MM75)

  • Hi. We have two iphones and one Itunes account. How do back up each one without getting the others contacts

    Hi. We have two iphones and one Itunes account. How do back up each one without getting the others contacts and without syncing each phone to each other?

    Welcome to the Apple community.
    Ideally you should each have your own iCloud account, providing you with your own contacts, calendars etc, not doing so will result in exactly what you have experienced. The contacts have likely been lost due to the options you have chosen at the login stage on each device.
    Unless you have the missing contacts in a backup file, they won't be recoverable unfortunately. You can add them manually to the contracts that already exist and continue to share the iCloud account if you wish, but I suggest that you each have your own iCloud account.
    Note, you can each have your own iCloud account, but continue to share an iTunes account for purchases of apps, books, music, TV shows etc etc.

Maybe you are looking for

  • After down loading the latest up dates, I am now getting a pop up that says can't get e mail server stopped working, how can I stop this pop u.

    After the latest ISO 8.3 down  load to my, I now keep getting a pop up saying can't gette mail server stopped working, I am still receiving e mail so I know it working, it's just annoying having to cancel this pop up, any ideas how to stop this pop u

  • Where Used in Production System

    Where Used in our dev system retrieves a related custom ABAP for able T179. However, when I do the same where used for table T179 in Prod it does not? Anynbody know whats going on?  Thanks.

  • Problem loading Image through XML!

    Hi,   I am Akshay and am beginner in this forum. I am trying to load images using flickr API and having problem. I am doing it in following fashion: 1) I am calling the Httpservice to get the xml through flickr API as <s:HTTPService id="photoService"

  • Using as1 in flash cs5

    hi i am using macromedia flash 6 at the moment and i realise i need to update to adobe cs5 however it has taken me so long to learn  the as1 scripting language  that i was wondering if i can still access and edit and publish my  old swfs in adobe wit

  • Simple FTP Reader problem

    Hi. At first my mission is to read from FTP server. So I have created FtpAdapter which have JNDI name eis/Ftp/FtpAdapter (default that comes with SOA Suite). At WebLogic FtpAdapter configuration I have changed property host to working ftp server. Eve