Fusion of two sets of complementary results... or EXTERNAL joins works do not?

Dear experts!

Again, I have a very difficult problem, for which I ask your help, but this time I'm better prepared than last time and can provide sample data of my (hopefully not too much) simplified example:


create table topics)
primary key not null number pk_id,
title varchar2 (128)
)
/

create table people)
primary key not null number pk_id,
name varchar2 (128)
)
/

create table (results)
primary key not null number pk_id,
number of fk_subjects_id
number of fk_people_id
number of result
)
/

insert into topics (pk_id, title) values (1, 'choose a recipe')
/

insert into subjects (pk_id, title) values (2, 'Shopping ingrédients')
/

insert into topics (pk_id, title) values (3, 'preparations')
/

insert into topics (pk_id, title) values (4, ' Cooking for beginners ")
/

insert into topics (pk_id, title) values (5, "power to the pros")
/

insert into subjects (pk_id, title) values (6, "Washing dishes for everyone")
/

insert into topics (pk_id, title) values (7, 'digestion for experts')
/

insert into topics (pk_id, title) values (8, 'becomes hungry again... »)
/

insert into topics (pk_id, title) values (9, ' redo from start ")
/


insert into people (pk_id, name) values (1, 'Hank')
/

insert into people (pk_id, name) values (2, "Cloe")
/

insert into people (pk_id, name) values (3, 'Mary')
/

Insert in the results (pk_id, fk_subjects_id, fk_people_id, result) values (1, 1, 1, 2)
/

Insert in the results (pk_id, fk_subjects_id, fk_people_id, result) values (2, 2, 1, 4)
/

Insert in the results (pk_id, fk_subjects_id, fk_people_id, result) values (3, 3, 1, 3)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (4, 9, 1, 5)
/

Insert in the results (pk_id, fk_subjects_id, fk_people_id, result) values (1, 2, 5, 4)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (6, 2, 2, 1)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (7, 3, 2, 5)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (8, 4, 2, 2)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (9, 5, 2, 3)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (10, 6, 2, 2)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (11, 7, 2, 1)
/

Insert the values related to outcomes (pk_id, fk_subjects_id, fk_people_id, result) (12, 4, 3, 3)
/

Insert the values related to outcomes (pk_id, fk_subjects_id, fk_people_id, result) (13, 5, 3, 5)
/

Insert the values related to outcomes (pk_id, fk_subjects_id, fk_people_id, result) (14, 7, 3, 1)
/

insert into a values (pk_id, fk_subjects_id, fk_people_id, result) results (15, 8, 3, 5)
/

Insert the values related to outcomes (pk_id, fk_subjects_id, fk_people_id, result) (16, 9, 3, 1)


Please imagine this as a University for cooks. Now, I want to introduce them to their record of performance / "scorecard", for each student, with his or her marks. This performance record should be a list of all the 9 subjects can spend, and where students got a result, result must be filled in. I have thought that it should be possible to achieve something like this:

SELECT PEOPLE.NAME, SUBJECTS. AS SUCH, RESULTS. RESULT OF RESULTS
JOIN THE PEOPLE ON THE PEOPLE. PK_ID = RESULTS. FK_PEOPLE_ID
JOIN TOPICS ON SUBJECTS. PK_ID = RESULTS. FK_SUBJECTS_ID
WHERE THE RESULTS. FK_PEOPLE_ID = 2

But also to help (LEFT |) LAW | FULL OUTER joins) here doesn't help me get what I want, I always get only

NAME TITLE RESULT
-----
Cloe choose a recipe 4
Cloe Shopping ingredients 1
Cloe preparations 5
Cooking for beginners 2 Cloe
Cloe eat for 3 pros
Cloe dishes for everyone 2
Cloe to digest for 1 experts

But I want to:

NAME TITLE RESULT
-----
Cloe choose a recipe 4
Cloe Shopping ingredients 1
Cloe preparations 5
Cooking for beginners 2 Cloe
Cloe eat for 3 pros
Cloe dishes for everyone 2
Cloe to digest for 1 experts
Cloe becomes hungry again...
Cloe Redo from start

Without having to fill out empty lines for all students who do not yet have all the examinations.

Is this possible? If so, how?

I thank very you much in advance and Happy Easter to all! :-)

With sincere friendships.
Chriss

Edited by: user9355711 the 01.04.2010 07:01

Edited by: user9355711 the 01.04.2010 07:28

Edited by: user9355711 the 01.04.2010 07:29

Hi Chase,
Thank you for creating and insert.
It helped a lot.
Here's a solution.
It uses the Oracle syntax and no ANSI Joins.but returns the desired outcome.

SELECT  p.NAME,sub.title,res.RESULT
  FROM (SELECT * FROM RESULTS WHERE fk_people_id=&num) RES, SUBJECTS SUB,people  p
 WHERE SUB.PK_ID = RES.FK_SUBJECTS_ID(+) AND (res.fk_people_id=p.pk_id OR res.fk_people_id IS NULL) AND p.pk_id=&num
 ORDER BY fk_subjects_id

See you soon!
Bobin

Tags: Database

Similar Questions

  • HP laptop PC 15 15-d054se: setting of the brightness of the keys works do not (f2 + f3)

    I installed Windows 7, but after that, I am not able to adjust the brightness with function keys. I don't even adjust opition brightness in power opition. Kindly help me to solve this problem.

    Hello

    First of all, if you have not yet done so, download and install the Chipset driver from the link below.

    http://ftp.HP.com/pub/SoftPaq/sp64001-64500/sp64343.exe

    When the installation has completed, restart the laptop.

    Then download and reinstall the driver of Intel HD graphics on the following link.

    http://ftp.HP.com/pub/SoftPaq/sp66001-66500/sp66213.exe

    When reinstalling, restart the laptop.

    Kind regards

    DP - K

  • Separator for set two sets of headphones to the port single external microphone on iMac

    We want two people appear on the screen even when talking to anyone else on Skype. Is there a splitter available that would allow me to set the two sets of headphones to the port single external mic so that we can use the headset mic and get good sound quality?

    All divisor inexpensive listener should be able to do, for example that I found on Amazon:

    https://www.Amazon.com/Belkin-speaker-and-headphone-splitter/DP/B000067RC4/ref=s r_1_2? ie = UTF8 & qid = 1473882646 & sr = 8-2 & keywords = earpiece + separator

  • Then two sets of the Airpod be used for listening to same iPhone?

    Is it possible to pair two sets of the Airpod to the iPhone same so that two people can share and listen to the sounds, like a watching a movie or a game together?

    Number one at a time.

  • Two sets of two short beeps appear during the priming of the old Satellite Pro series

    Laptop was upgraded and repaired, with the new memory, DVD and hard drive in April.
    Also XP SP3 isntalled.

    Last week, I turned it on and windows was loading, I've heard two sets of two short beeps.
    Rest of the laptop seems to work ok, bar NIVDIA towers problems when I turn off, but I have now the laptop as I want and I worry about those beeps. Of course, guaranteed for repair was three months, and who is just exhausted.

    Oh woe is me. Can anyone? I can't reinstall everyting all again. Too old.

    A surfer very silvery with a phobia of beep.

    Hmm. I m using CCleaner also but just to clean the files in time and repair the registry, I never hear two beeps in missing hardware/driver, so for me, this does not look like CCLeaer that would solve...
    But two beeps sometimes appear when starting the laptop, this could be the sound POST (self-test notification under tension).

    However, you should also check if these two beeps would be available after the installation of new OS (new installation).

    Welcome them

  • I used fresh paint in Windows 8 and had two sets of brushes - wet & dry. Now, after Windows 10, I seem to only have dry. Any thoughts?

    I used fresh paint in Windows 8 and had two sets of brushes - wet & dry.  Now, after Windows 10, I seem to only have dry.  Any thoughts?

    Hello

    Thanks for posting your query on the Microsoft Community.

    According to the description, I understand that you have a query with fresh paint.

    Try to uninstall the application and then reinstall it.

    Uninstall and reinstall the application

    I suggest that you uninstall, then reinstall the app of fresh paint. follow these steps:

    1. right-click on the new paint app and click Uninstall.

    2. open the Windows Store.

    3. for the application of the fresh paint and click on install.

    4. check if the problem persists.

    Fresh paint FAQ:

    http://answers.Microsoft.com/en-us/Windows/Forum/windows_8-Winapps/fresh-paint-FAQ/552a7366-fbd2-4b19-a4b8-4021453a4835

    Hope this information helps. Please let us know if you need any other help with Windows in the future. We will be happy to help you.

  • Comparing two sets of data in BPEL

    Hey guys,.

    There is a web service that provides (and is the source of) data, and a table that is independent of the service that contains the same data. I am writing a 11g BPEL process to synchronize the data that is returned by the service with the data in the table. I invoke the database and service adapter to receive a data collection and I need to compare two sets of data to see what is on the whole of the service data that is not in the set of data in the table, so that I can insert them into the table. I also need to compare the values of the data sets possible updates of already existing records. I don't know how to do it though. I thought using a java embedded activity to compare the two games. What is the best way to do it? Examples of code would be much appreciated.

    Thank you

    Bill

    Hi, can not use the merge (insert or update) operation in the adapter of database for this use case?

  • With the help of & lt; CFIF & gt; to compare two sets of time

    I use < cfif > to compare two sets of time, if there is a match, and then display the link. I do something wrong because it displays is not a link even thought it is a football game. I'm using the Access database, any help is greatly appreciated!

    Here is my code:

    < CFQUERY DATASOURCE = "testDB" NAME = "gettasks" >
    SELECT id, event_name, from_date
    calendar
    where from_date > = # #dateformat(daterequest,'mm/dd/yyyy') #.
    AND from_date < = # #dateformat(daterequest,'mm/dd/yyyy') #.
    < / CFQUERY >

    < CFSET startTime = CreateTime (0,0,0) >
    < CFSET endTime = CreateTime (23,59,59) >

    < TABLE BORDER = "0" CELLPADDING = "0" CELLSPACING = "0" STYLE = "" border-collapse: collapse "WIDTH ="100% "ID ="AutoNumber1">"
    "< = CFLOOP" "#startTime #" TO = "#endTime #" INDEX = "i" STEP = "#CreateTimeSpan (0,1,0,0) #" >
    < CFOUTPUT >
    < b >
    < TD WIDTH = "6%" HEIGHT = "20" onClick = "javascript: popup ('addevent.cfm?)" addDate = #daterequest #& addTime = #TimeFormat (i, "h: mm tt") #")" VALIGN = "TOP" ALIGN = "right" BGCOLOR = "# A0AB84" CLASS = "smallWtext" STYLE = "cursor: point;" " cursor: hand; border-left: 1px solid ##EAEAEA; border-top: 1px solid ##EAEAEA; border-right-style: Double; border-right-width: 3 "> #TimeFormat (i, 'h tt') # < table >"
    < TD WIDTH = "94%" HEIGHT = "20" STYLE = "border-right: 1px solid ##EAEAEA;" border-top: 1px solid ##EAEAEA; border-bottom-style: dotted; border-bottom-width: 1 "BGCOLOR ="##FFFFEB"CLASS ="text">
    < CFLOOP QUERY = "gettasks" > <! - problem cannot match time - >
    < TimeFormat (from_date, "h tt") CFIF is ' #TimeFormat (i, 'h tt') # "> < A HREF =" editevent.cfm? id = #id # & daterequest = #daterequest #"> • #event_name # < /A > < br / > < / CFIF >
    < / CFLOOP > < table >
    < /TR >
    < b >
    < TD WIDTH = "6%" HEIGHT = "15" onClick = "window.location ='daily.cfm? disp = add & addDate = #daterequest #& addTime = #TimeFormat (i,"h: mm tt") #"; return true; "ALIGN ="right"BGCOLOR =" # A0AB84 "STYLE =" cursor: point; cursor: hand; border-left: 1px solid ##EAEAEA; border-right-style: Double; border-right-width: 3; < cfif #TimeFormat (i, 'h tt') # is "23:00" > border-bottom: 1px solid ##EAEAEA < / cfif > ' > < table >.
    < TD WIDTH = "94%" HEIGHT = "15" STYLE = "border-right: 1px solid ##EAEAEA;" "< cfif #TimeFormat (i, 'h tt') # is"23:00 "> border-bottom: 1px solid ##EAEAEA < / cfif > ' BGCOLOR ="##FFFFEB"> < table >
    < /TR >
    < / CFOUTPUT >
    < / CFLOOP >
    < /table >

    OK, let's try another direction. Keep as an object DateTime from_date and use the createodbcdate() and createodbcdatetime() functions to convert your variable daterequest to date/time objects and compares the range.


    SELECT id, event_name, from_date
    calendar
    WHERE the from_date BETWEEN #createodbcdate (daterequest) #.
    AND #createodbcdatetime(daterequest+"23:59:59") #.

    Phil

  • TypeError: Result of expression 'item' [undefined] is not an object.

    Hello

    I can userstand the good way to spend the ListItemData given to a page entry. In the example ListView generated here is what is generated.

    import bb.cascades 1.2
    NavigationPane {
        id: nav
        Page {
            Container {
                ListView {
                    dataModel: XmlDataModel {
                        source: "data.xml"
                    }
                    onTriggered: {
                        if (indexPath.length > 1) {
                            var chosenItem = dataModel.data(indexPath);
                            var contentpage = itemPageDefinition.createObject();
                            contentpage.itemPageTitle = chosenItem.name
                            nav.push(contentpage);
                        }
                    }
                    accessibility.name: "Listing"
                }
            }
        }
        attachedObjects: [
            ComponentDefinition {
                id: itemPageDefinition
                source: "ItemPage.qml"
            }
        ]
        onPopTransitionEnded: {
            page.destroy();
        }
    }
    
    import bb.cascades 1.2
    Page {
        property alias itemPageTitle: titlebar.title
        titleBar: TitleBar {
            id: titlebar
        }
        Container {
        }
    }
    

    If I wanted to copy the input data to the push page, then I can do that.

    import bb.cascades 1.2
    NavigationPane {
        id: nav
        Page {
            Container {
                ListView {
                    dataModel: XmlDataModel {
                        source: "data.xml"
                    }
                    onTriggered: {
                        if (indexPath.length > 1) {
                            var chosenItem = dataModel.data(indexPath);
                            var contentpage = itemPageDefinition.createObject();
                            contentpage.item = chosenItem
                            nav.push(contentpage);
                        }
                    }
                    accessibility.name: "Listing"
                }
            }
        }
        attachedObjects: [
            ComponentDefinition {
                id: itemPageDefinition
                source: "ItemPage.qml"
            }
        ]
        onPopTransitionEnded: {
            page.destroy();
        }
    }
    
    import bb.cascades 1.2
    Page {
        property variant item
        titleBar: TitleBar {
            id: titlebar
            title: item.name
        }
        Container {
        }
    }
    

    And this also works except that it generates a

    TypeError: Result of expression 'item' [undefined] is not an object.

    error. Thus, it is written in the ebook learn Blackberry App Development 10. Anyone know how to get this to work without him spit the error type?

    Thank you

    the problem is that the point is not defined when the page is created.
    a solution would be to use onItemChanged to set the title.
    or use something like element? Item.Name;
    There are many other possible solutions, but these two come to mind that the easier.

  • Do I need two drivers Synaptics & ALPS to get the touchpad working?

    It Somethere I read for touch pad works perfectly it must be instaled Synaptics (the one I need for mine) and the ALPS.

    I was curios that is false information or it works?

    Hi mate ;)

    In my opinion, you should install always two drivers.

    More information, driver page Toshiba said:

    Jagoda86 _Alps - this driver allows you to set the properties and functions of mouse control.
    _Synaptics_ - this driver allows you to set the properties and the touch pad control functions.

    I assume that you need two drivers for all functions, which can be changed in the settings of the touchpad.

    If you want you can try to install only one of the two pilots, and then to verify that the settings are not available or that lack exactly.

    See you soon

  • Display problem multiscreen-cannot configure monitor two (side-by-side) with the ability to work on both

    Hi all

    I am trying to configure Win7 so I can use two monitor (side-by-side) with the opportunity to work on both. For example, to keep the email open on one monitor and use other software on monitor B.

    Here is a screenshot that shows the settings I use. Can someone please take a look and advise?

    Thank you!

    Todd

    The graphics card may have the drive necessary to operate 2 monitors on a split bar but monitors also communicate with the PC to tell him what the monitor can handle using the SDC.

    It cannot accept the two sets of data SDC on the same entry even if theoretically they have the same data to send.

  • Impossible to delete the two files and shows me the error message windows does not properly

    Hello

    can't delete two files that actually a song file VLC webrib exdr video...
    cannot select the option to delete the time I click file tht it shows me the message "windows doesn't work maybe not properly" and the file stops immediately once that I close this error message... Please give me a solution to this

    Hi MakPatel,

    You can delete these files via the command prompt, if your window closes...

    (1) open the command prompt. (Click the Startbutton .) In the search box, type command, and then prompt in the list of results, double-click command prompt. )

    2) navigate to the download folder where the video file is present, using the "cd"command.

    For example, if your file is present in the "C:\Users\user1\Downloads".

    Type cd C:\Users\user1\Downloads and press enter in the command prompt.

    (3) Delete (Remove) the file name using the "del" command.

    For example, if your video file name is "sample.mp4.

    Led sample.mp4 type and press enter in the command prompt.

  • my new iMac (retina 5K, 27 inches, end of 2015) 4 GHz Intel Core i7, 32 GB 1867 MHz DDR3, TB 3.12 Fusion Drive bluetooth not working do not message comes bluetooth is not available

    my new iMac (retina 5K, 27 inches, end of 2015) 4 GHz Intel Core i7, 32 GB 1867 MHz DDR3, TB 3.12 Fusion Drive bluetooth not working do not message comes bluetooth is not available

    Reset the SMC.

    Barry

  • The procedure of procurement of the game Clash of Clans first two payments $9.99 $4.44 and the second did not gems continued with the developer of the game and they told me to resolve this ongoing problem with Apple's iTunes... help me solve

    The procedure of procurement of the game Clash of Clans first two payments $9.99 $4.44 and the second did not gems continued with the developer of the game and they told me to solve this problem continue with Apple iTunes... help solve me this problem and the compensatory jewelry

    Double-see your message, my first response to this topic tells you how to contact iTunes Support (we are fellow users): Re: the procurement process of the Clash game Clans the amount was deducted from the iTunes account and do not have t...

  • Satellite M30-104 - cannot set a good resolution on external monitor

    Hello world

    I have a Satellite M30-104 with a nvidia GeForce FX5200.
    This works well but when I plug in an external monitor, which is a widescreen 1440 * 900, I can not put the correct resolution, even if I install the latest driver.

    What can I do?

    Thank you

    Hello

    First of all you must check in your manual if your graphics card would support such a resolution external.

    But note; you will not be able to select this resolution if the graphics driver doesn t contains, although this resolution would be supported by the graphics card.

    As you can see two facts are important: driver graphics and graphics card can support this resolution if you want to use.

    Welcome them

Maybe you are looking for

  • Microsoft will come out with a "WinPad' (Windows iPad)?

    I was just wondering... It would be very cool. I would like TO design / develop the WinPad!

  • Contacts Sidebar icon not displayed correctly in Vista Home Preium

    Problems with Windows Vista Home Preium SP2 and IE9, I found. 1. when it is installed IE9 gadgets installed with Windows Vista will notdisplay correctly in the sidebar. 2. some AV files are not open when you surf the Internet. 3. some Web-based Activ

  • Wi Di?

    Dear members Please forgive my ignorance, but I want to connect my new computer windows laptop 8.1, HP Pavilion 15-n281, on my Sony HD TV so that I can watch videos on the internet etc. on the TV. I used the 'Waves Q' link on my old system of windows

  • Am I allowed to make a copy of windows 7 disks after purchase?

    If I buy windows 7 retail am I allowed to make disks for legitimate installation and/or relocation copies so that I can keep the originals safe and clean?

  • compatibility iPod with the laptop HP Pavilion g6

    But I have an ipod from a friend. Tried to use it on my HP Pavilion g6, but it does not work. It installs the program itunes and everything, but does not work when I open the file or the shortcut. What's wrong?