Help me.subquery belonging to a person on a single line on the lines of the Display.
CREATE TABLE STUDENTS(
NUMBER OF OPPORTUNITY,
NAME VARCHAR2 (30 BYTE),
STUDENT_ID);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
1, "Carol Haan", 1);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
3, "Saskia Tune", 2);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
1, "Saskia Tune", 2);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
2, "Saskia Tune", 2);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
3, "Mark Quin', 1);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
4, 'Aretha June', 3);
INSERT INTO STUDENT (LANGUAGE_ID, STUDENT_ID, NAME) VALUES)
1, 'Aretha June', 3);
COMMIT;
CREATE TABLE STUDENTS_JOBS
(
JOB_ID NUMBER,
JOBNAME VARCHAR2 (20 BYTE),
LANGUAGE_I);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
1, "Registrar", 1);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
2, 'reception clerck', 2);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
2, 'reception clerck', 1);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
2, 'reception clerck', 3);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
3, 'manager', 1);
INSERT INTO STUDENTS_JOBS (JOB_ID, JOBNAME, LANGUAGE_ID) VALUES)
3, 'manager', 4);
COMMIT;
CREATE TABLE STUDENT_LANGUAGES
(
NUMBER OF OPPORTUNITY,
LANGUAGE VARCHAR2 (30 BYTE)
);
INSERT INTO STUDENT_LANGUAGES (LANGUAGE_ID, LANGUAGE) VALUES)
1, 'English');
INSERT INTO STUDENT_LANGUAGES (LANGUAGE_ID, LANGUAGE) VALUES)
2, "Dutch");
INSERT INTO STUDENT_LANGUAGES (LANGUAGE_ID, LANGUAGE) VALUES)
3, 'Spanish');
INSERT INTO STUDENT_LANGUAGES (LANGUAGE_ID, LANGUAGE) VALUES)
4, "Japanese");
INSERT INTO STUDENT_LANGUAGES (LANGUAGE_ID, LANGUAGE) VALUES)
5, 'German');
COMMIT;
I, ve worked with languages_id. the aiming languages_id students and students_jobs at the same
opportunity in the student_languages. In the subquerie following students who speak the
the languages that are required in the student_jobs are derived.
In the example, the used job_id argument is 1, it's just in the example but it could be any job_id.
SELECT DISTINCT
$m.name
m.student_id
s.language
students m, student_languages s
Where s.language_id = m.language_id
and not EXISTS
((select opportunity
of students_jobs
where job_id = 1) less (select opportunity
students
where student_id = m.student_id));
The result is as follows:
STUDENT_ID LANGUAGE NAME
English Aretha June 3
Japanese Aretha June 3
Carol Haan 1 English
Saskia Tune 2 Dutch
Saskia Tune 2 English
Saskia Tune 2 Spanish
The problem is that I need a query that can put the languages in addition to the person (a line), with the language of a person in a line and not separately in different lines.
the result should be as follows:
student_id language name
3 June Aretha English, Japanese
Carol Haan 1 English
Saskia Tune 2 Dutch, English, Spanish
I don't know if this can be done with prior agreement. I really need help.
Can someone help me pleasse. Don't mind English mine.
Greetings,
Caroline
Hi, Caroline.
What you want is called "Aggregation of String": make a long list, delimited containing any number of individual elements (language names, in this case).
This page:
http://asktom.Oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:2196162600402
has several techniques.
I use (and recommend) one, a user-defined function called STRAGG which can be copied directly from the above site.
When you have installed STRAGG, you can get the results you want like this:
SELECT m.name
, m.student_id
, STRAGG (s.language) AS all_languages
from students m
, student_languages s
Where s.language_id = m.language_id
and not EXISTS
( ( select language_id
from students_jobs
where job_id = 1
)
minus ( select language_id
from students
where student_id = m.student_id
)
)
GROUP BY m.name
, m.student_id;
In Oracle 10 (and more) you can have a function like STAGG, called WM_CONCAT, that is already available.
The site referenced above also shows how string aggregation using the "CONNECT BY...» BEFORE... ", as you said.
Thank you for including CREATE TABLE and INSERT!
Tags: Database
Similar Questions
-
Hi, I do not know where to turn: the person who takes care of all the stuff of count is out of town, this friend started Firefox and there was a message about an update, I thoght I again just click on install and wait to re start Firefox. But what I remember is this another open window and asked me to choose 'something' (an icon or banner or?), I thought I have to click on an element (I guess I should read all clearly). Firefox updated to 3.6.4, but it also inserted some sort of what might be called a banner? But it does cover only partially the half right of my 3 toolbars at the top of the Firefox window. It cannot be used to something else because it's just a mess of colors and unknowns, except for what looks like a 'top' and what I recognize as an icon of Firefox (but only partially visible)! Now, what he does, it's partly hide this part all the toolbars and they are difficult to read and to do to turn this 'thing' impossible to understand, if I keep to? I can't find in any case to remove it or use it? But since the icon of Firefox is about it, I think you need to know what it is and how trash. I'm sorry for this accident caused my my inattention, but I'm not much of a computer person - HELP! Thanks for any help. Judi
This has happened
Each time Firefox opened
Today is Thrsday June 24, 2010
The only thing I can imagine: it's a character.
Tools-> Add-ons-> Themes
Here should be the character (light theme)
and a button 'delete '.Click on it (delete button), and he (Persona, this mixture of colors) should disappear instantly.
This help you?
-
Pls I need help to reset my bios of my computer compaq mini CQ10. The error code is[personal information deleted]
Hello
Please try (all lower case):
e9loq3fzpv (3rd tank is a tiny l).
Kind regards.
-
I'll be out of town for a few days and I would block all my personal files and folders again, let the internet open to all users.
How I do.
Thanks for any help!
I'll be out of town for a few days and I would block all my personal files and folders again, let the internet open to all users.
How I do.
Thanks for any help!
You mean that other users do not have their own user accounts?
They all connect to your own account?If they all have their own user account to log on, they can't see your personal files, unless...
1. your files in public folders.
2. they have your password to login to your own account.So, please clarify.
t-4-2
-
How to make a paper with some boxes to fill required for me to sign, and then some other boxes needed for the next person to sign. I want the boxes I've filled to be locked the next person.
Hi johanb64152807,
You can use eSign service, where you can send the document for signatures of several signatories, but the document will be sent to the following signatory after the earlier signed & it is not possible for him to make the changes.
Documents KB for help: -.
- Get started | Cloud of Document Adobe Tutorials
- Quick Installation Guide | Services Adobe eSign
- Send for electronic signature in eSign Adobe Document Cloud services | Adobe Acrobat DC tutorials
- Send agreements and collecting signatures. eSign services
- FREQUENTLY ASKED QUESTIONS | Services Adobe eSign
Kind regards
Nicos -
I want to install creative cloud. When I connect with my personal information, I can't have the country where I live. I call the free number but it is the number o the firefighter... How can I change the country where I live to make the payment?
Please see the change of the country associated with your Adobe ID.
To change the Adobe ID, you can check your Adobe ID account management
For further help please contact the Support from Adobe on the Customer Contact
Hope this will help you.
Kind regards
Hervé Khare
-
I want to use only a single address book. When I star a contact, address goes to the personal address book, despite the address book of OS being specified in the menu. How can I transfer a name of the personal address book in OS Inbox. Can I remove the personal address book? Or transfer the contacts, and then eliminate the OS address book? Thank you very much. New user.
Personal and collected address books are the books by default and cannot be deleted.
You can select all the contacts in the book of MAC and move them to the personal address book.
Select a contact in the MAC book. Press Ctrl + a to select. Drag them into the personal book and drop them there.
You can click on the star a second time after adding a contact to open the Edit dialog box and select another address book from the drop-down list. -
My iPhone 5 c opens more after that I was invited to be updated with iTunes. now the display shows iTunes logo and the USB cable. I have read and applied some tips here, but nothing happened. Any help will be much appreciated. Thank you.
https://discussions.Apple.com/message/30014877#30014877http ://
Read the post from sierrawren . It helped me to fix my phone. Now it works perfectly fine. Hope it can help others too.
-
I have a complaint on my Mac Book Pro. I bought my computer in January 2016 and it has two problems: the first is the display of the retina that has many traces of the keyboard and as many times it freezes. I have looked for help on the local Apple Store and support too, but it did not help. I would like you help me solve this problem.
Thank you.
Kelly
Your machine is still under warranty, so you should take it to your local Apple store for repairs. Function late in January, you bought it, you still have phone without support. If you can't find any help on the Apple Store, then I don't know what you expect to find here. We have no way to check for problems you have described or any additional hardware, etc.
-
Personas I've been watching for the last week or two are not what I would choose. Whenever I click on the boy to my toolbar it tell's me that he has the character of my favorite addded. I don't want them there. I can't get signed to check my faves. I ask my new password sent to me the email never comes. No icon in the corner below the no matter what, left or right.
I don't know anything about the module complementary Personas Rotator, but if you don't see the icon, you might not display the toolbar of the modules. To turn on that:
Menu view > toolbars > check Add-ons Toolbar
(If you have the orange Firefox button, press the Alt key to temporarily show the classic menu bar).
-
My camera iPhone 5s is accessed remotely? Whenever I use my phone torch ends up taking videos. Is it possible for a person to access my camera through the torch. We share the same Apple ID
N °
but maybe you tap the camera icon (bottom-right) when you press the icon of the torch (with the other hand maybe?)
-
THE DISPLAY SHOWS REQUEST UNAUTHORIZED MAKE SURE THAT YOU HAVE LOGGED. I DOWNLOADED THE APPY AND IT SAYS I HAVE BUT I GET THIS HELP
Using all CAPS in a forum online is screaming rude and thoughtful.
Turn off your CAPS LOCK, SHIFT, or your keyboard does not work as well?
-
Help! I've turned the display of 90 degrees!
I was working on my husband's computer, and I messed up the monitor. Now, I try to understand what I did and put it before he finds out. I've been locked up computer in iTunes...... I hit CNTR-ALT-DEL to go to the Task Manager, I tried to close the applications, but it is on the page of "process" instead. He was frozen... I hit any button to see if I could get the computer to do anything. Finally, I went on the "Start button", hit restart computer and he quit and came back, but now the display on the screen rotates 90 degrees clockwise. I really need to ask your help see if I can put this back before my opinion of her husband. He's a WONDERFUL guy, but it's not going well. My Christmas present may hang in the balance. Thank you!
Hi, look, try this, press ctrl + alt + arrow (right or left). This should solve your problem.
-
I need help deleting these accounts quickly because I'm not going to use the most.
Cancel/delete email
Hello look at these emails I created just a mess.
I need help deleting these accounts quickly because I'm not going to use the most.
I want just all my information wiped out of these emails
& When they are removed and all of my information are wiped out, I want these emails to become available and new to others for their use.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
E-mail address is removed from the privacy *.
Please thank you.
It is just a JOKESTER, but you're talking about Hotmail accounts? If so, please ask here.
Windows Live Solution Center Hotmail Forum
http://windowslivehelp.com/forums.aspx?ProductID=1 -
I can't find any help to fix my information bar in Windows Mail. It's like a split screen display. A suspected email "phishing" shows the warning in pink on the left side but right, I can still see the partial list of the names of "recipients" email & addresses. The button to unlock does not at all. There is no error message and it started 2 days ago. Do I need to reinstall the program, and if I do, could you provide me with information on how to configure Windows Mail once more.
Thank you!
Windows Update forced the installation of IE 9, and that's why you see the problems. See www.oehelp.com/OETips.aspx#15 for workarounds.
Steve
Maybe you are looking for
-
Cannot get the DV6 recovery disk to run.
I have a Pavilion DV6 2110ea.I just set up a new hard drive.I wanted a new installation of the operating system without all the extras of HP. So I downloaded the correct version of Windows 7 which was pre-installed when I bought the laptop (Home Prem
-
HP 6510 printer will not print iPad, ok the mobile, wireless
Everything worked until today. When you try to print wirelessy to ipad, I get a message saying the printer is offline. This also happens with our second ipad. It prints the laptop wireless.
-
Backup of the recovery file, but will not write (well tested) USB
Yesterday ran backup file recovery in the HP Recovery Manager. Got to the end, but USB key was too small - had to cancel the program and buy another USB key last night. Today the program is completely but allow me not to click 'Next', so it will writ
-
"I'm doing a video basketball highlights and whenever I import a video I get an error saying" "format that movie maker does not recognize. How do I change the format or is - anyone know of a good free video program which will not leave the watermark
-
How to fix the error of loading mscoreei.dll files?
I get a message error "C:\Windows\Microsoft.Net\Framework64\v4.030319\mscoreei.dll could not be loaded." Please let me know how to fix this error?