Selecting two different Names using the same table with same field

Hello,
I am trying to display several fields from different tables. Here are some of the fields that I need: The instructor needs to go after the social.
WESL | ENGR-1101-SW1 | Hinojosa | Ashley | Social | Instructor |
I am using a table where they have the social and I need to get both the student and the instructor. How do I select the instructor when the instructor's id is on a different table. example
CLASS PERSON CLASS_ASSIGN
student_id student_id: name facutly_id
Here is the code that I have so far and it works.
rem ----------------
rem Filename: cer.sql
rem Purpose: to get data from banner and put into flat file
rem Date: August 17, 2006 4:51 P.M.
rem Author: Robert Hernandez
rem ---------------
rem Notes: Need to add the Instructor - having problems
rem using the same spriden_id.
rem Also need to have admissions enter the grad date for
rem several students: Procedure is working as is.
declare
l_output utl_file.file_type;
grad_month varchar2(2);
buffer varchar2(1000);
cursor cursor1 is
select ssrmeet_bldg_code,
ssbsect_subj_code,
ssbsect_crse_numb,
ssbsect_seq_numb,
spriden_last_name,
spriden_first_name,
spriden_id,
scbcrse_title,
ssbsect_term_code,
sfrstcr_grde_code,
sorhsch_graduation_date,
decode(substr(sorhsch_graduation_date,4,3),'JAN','01',
'FEB','02',
'MAR','03',
'APR','04',
'MAY','05',
'JUN','06',
'JUL','07',
'AUG','08',
'SEP','09',
'OCT','10',
'NOV','11',
'DEC','12') as grad_month,
sorhsch_sbgi_code
from ssbsect,ssrmeet,sfrstcr,spriden,scbcrse,sorhsch
where rownum < 200
and ssbsect_seq_numb like 'S%'
and (ssrmeet_term_code = ssbsect_term_code
and ssrmeet_crn = ssbsect_crn)
and (ssbsect_crn = sfrstcr_crn
and sfrstcr_pidm = spriden_pidm
and length(spriden_id) = 9
and substr(spriden_id,1,1) <> 'A')
and (ssbsect_crse_numb = scbcrse_crse_numb
and ssbsect_subj_code = scbcrse_subj_code)
and spriden_pidm = sorhsch_pidm
and sorhsch_graduation_date is null
order by ssbsect_crse_numb;
begin
l_output := utl_file.fopen('CER','rbfpce.txt','W');
for cur1_rec in cursor1 loop
buffer:= cur1_rec.ssrmeet_bldg_code||'|'||
cur1_rec.ssbsect_subj_code||'-'||
cur1_rec.ssbsect_crse_numb||'-'||
cur1_rec.ssbsect_seq_numb||'|'||
cur1_rec.spriden_last_name||'|'||
cur1_rec.spriden_first_name||'|'||
substr(cur1_rec.spriden_id,1,3)||'-'||
substr(cur1_rec.spriden_id,4,2)||'-'||
substr(cur1_rec.spriden_id,6,4)||'|'||
cur1_rec.scbcrse_title||'|'||
cur1_rec.ssbsect_term_code||'|'||
cur1_rec.sfrstcr_grde_code||'|'||
'20'||SUBSTR(cur1_rec.sorhsch_graduation_date,8,2)||
cur1_rec.grad_month||'|'||
cur1_rec.sorhsch_sbgi_code;
utl_file.put_line(l_output,buffer,false);
end loop;
utl_file.fclose(l_output);
exception
when no_data_found then
utl_file.fclose(l_output);
end;
/

Can you be more precise , please :
- which table stores the people identities ? (I call this one Identity)
- which table gives the class where the student works in (I cal l this one Claa_attendees)
- which table gives the instructor of a class (I call this one Class)
If your issue is that you have one table which stores Itendities , and you need to display Student identity and Instructor Identity, you have to call this table twice in your query , using table aliases . I mean :
Select Stud_iden.name, Instr_iden.name
From Identity Stud_iden, Identity Instr_iden, Class_attendees, Class
Where Class.clas_id = class_attendees.class_id
and class.instructor_id = Instr_iden.people_id
and class_attendees.student_id = Stud_iden.people_id
Is this what you need to do ?

Similar Messages

  • Can I download itunes on two different computers using the same apple id?

    Can I download itunes on two totally different computers using the same apple id and go back and forth between them (ie home computer and work computer)?

    You can use a laptop to set up multiple devices with the same apple ID and you can maintiain different content on each device.

  • Connecting to two database instances using the same Toplink

    Hi,
    We are trying to create a process using BPEL where data from one database instance needs to be passed to the other. The process is compiling properly and we could deploy it in BPEL Process Manager. But when we try to run the process, the data is not getting inserted into the second instance. There is no error /exception being thrown at most of the time, but at times we are getting a 'Unique constraint error' eventhough there is no duplication of data.
    Can we connect to two different instances using the same toplink. How can we achieve this.
    Thanks in advance
    Pratheusha

    You need to use two different sessions with two different mapping descriptors

  • Two very different results using the same settings (H.264 / Quicktime Pro)

    I’m a bit confused, I have used Quicktime Pro (v7.1) to encode DV into H.264 for iPod and this particular video is 18 minutes long and came out looking very good with the following settings;
    VIDEO: H.264 at 200kbps, Baseline Profile, 25fps, Auto Key Frames, 320x240 or 640x480, Multipass Best quality encoding.
    AUDIO: AAC Audio at 96kbps, 24kHz sampling freq, Stereo.
    However here is the twist…
    When I use the same exact settings to encode just the 30 second opener (from the 18 minute video) the encoded opener looks bad and blocky!
    Why? Same settings would make you assume that you should get a same or similar result, or am I wrong?
    The reason I have tried encoding this 30 second opener is that I am trying to work out which settings work best on the iPod (another issue) and I don’t want to spend hours test encoding the full 18 minute video, as you know H.264 is SLOW to encode!
    So can anyone help in regard to two very different results using the same settings?
    Regards,
    J
    PC   Windows XP  

    Alvin,
    Is it a commercially-released or home-burned CD?
    If it's commercially-released, try "encouraging" the recalcitrant computer by using the iTunes Advanced menu > Get CD Track Names command when it shows Audio CD.
    If it's home-burned, you will find that only the computer that actually burned the disc will know what's on it. The information won't be transferred to another computer.
    Let us know which, if either, of these situations applies to you.

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

  • Unable to copy database with different name in the same instance

    I had a huge database and wanted to try some change optimization changes.
    So wanted to make a copy of the database along with data in the same instance.
    I have tried copy database wizard several times but always see the error as in attachment.
    Can someone let me know how to troubleshoot further?
    If this is not the correct way please suggest how do i copy a database with different name in the same instance along with data.

    Hi Nandu,
    From the screenshot, the error 1813 happens when corrupt database log is attempted to attach to the SQL Server. To work around this issue, please preform the following steps, for more details, please review this
    blog.
    1. Create a new database with same name which you want to recover. Make sure that the MDF file and LDF file have same name with previous database data and log file.
    2. Stop SQL Server. Move original MDF file from old location to new location by replacing just created MDF file. Delete the LDF file of new location just created.
    3. Start SQL Server. At this point, the database is in suspect status.
    4. Make sure that system tables of Master database allows to update the values. Please note that you will be performing this in query window.
    Use Master
    go
    sp_configure 'allow updates',1
    reconfigure with override
    go
    5. Change database mode to emergency mode.
    SELECT *
    FROM sysdatabases
    WHERE name = 'DatabaseName'
    BEGIN
    UPDATE sysdatabases
    SET status = 32768
    WHERE name = ' DatabaseName '
    COMMIT TRAN
    6. Restart SQL Server. Then execute the following DBCC command in query window to create new log file.
    DBCC TRACEON (3604)
    DBCC REBUILD_LOG(databasename,'c:\yourdatabasename_log.ldf')
    GO
    7. Reset the database status using following command.
    sp_RESETSTATUS yourdatabasename
    GO
    8. Turn off the update to system tables of Master database running following script.
    USE MASTER
    GO
    sp_CONFIGURE 'allow updates',0
    RECONFIGURE WITH OVERRIDE
    GO
    9. Reset the database status to previous status.
    BEGIN
    UPDATE sysdatabases
    SET status = (value retrieved in first query of step 5)
    WHERE name = 'DatabaseName‘
    COMMIT TRAN
    GO
    Make sure that you have done all the steps in order and restarted SQL Server where it is mentioned. Also run SQL Server Management Studio as administrator.(Right click-> Run as Administrator)
    Thanks,
    Lydia Zhang

  • I am trying to store music for two different iPods on the same computer, against two different Apple IDs. When I try and download content from the Cloud I get an error message?

    I am trying to store music for two different iPods on the same Windows 8 computer, and when I try and download content from the Cloud I get an error message. Is it possible to have two different Apple IDs on the same computer?

    Unfortunately you've discovered too late how important it is to maintain an up-to-date backup of your iTunes library (and all other data of value).  You could, before wiping the drive, have considered making use of a commercial data recovery service that could (albeit at considerable cost) have extracted your library from the hard disk, even if virus infected.
    In the absence of that option, you will need to restore the content of your library from its original sources:
    Depending on your location, you may be able to re-download any iTunes Store purchases that are still available on the Store
    Likewise, most digital purchases from Amazon (including auto-rip copies of purchased CDs) should be available from the Amazon Cloud and via the Amazon Music application - the same may be true of other commercial sources for digital downloads
    Content imported from your CDs will have to imported again
    The specific situation that you describe regarding the music imported from your friend's external HDD suggests that either the source is badly organized and/or originates from a source other than iTunes (other media players may use alternative tags for information like artist, title, album, etc. that are not wholly consistent with how iTunes handle these).  Without details of the issues you're seeing it is difficult to suggest a remedy other than going through the media album-by-album, track-by-track, and correcting the inconsistencies.
    In the absence of a backup or access to the original library data there is no option other than painstakingly recreating your library as described above.  As you do so, you'll now realize how important creating and maintaining backups are - in my case I have at all times three separate duplicates of my library, in two different locations, where none is ever more than a week old compared to the content of my master library.

  • HT201269 Can I set up two accounts for two different iPhones on the same iTunes account. Jimmy

    Hello,
    CanI set up two accounts for two different iPhones on the same iTunes account. Thanks JIMMY

    http://support.apple.com/kb/ht1495
    You can use the same apple id for two separate phoones to share apps/music, however you would need a separate apple id for both phone for imessage/facetime/icloud.

  • How do I sync two ipods with two different IDs on the same computer?

    How do I sync two ipods with two different IDs on the same computer?

    Simply connect them.  One computer with one iTunes can manage multiple devices.  They're tracked by S/N but you might wish to assign them unique names so that you can track them yourself.
    The only minor issue is app updating and purchases while on the computer.  It's necessary to log out and back in to the "correct" ID.  Much easier to do these things from the iPods.

  • Control two different parameters at the same time

    Two motors were connected each other rigidly. One motor controlled torque and the other motor controlled speed. I generated some torque and speed data which represented one cycle of motion from a motor simulation. I like to send these two different data sets (torque and speed) to two different motors at the same time. Torque data sends to one motor and speed data sends to the other motor to see the response of the load profile. In order to do this, I thought about using multithread, but I am not sure it will work for this application. Usually multithreading delay the CPU time so the overall control process might be delayed, right? If you have better idea, please let me know.

    If you are using one motion controller to control both motors, you will probably run into problems if you try to use multithreading on the PC. However, you can execute up to 10 programs (threads) at a time, in addition to host communication, using on-board programming. For more information on on-board programming please refer to the following tutorial: Developer Zone Tutorial: On-board Programming in FlexMotion
    Best wishes!
    Dawna P.
    Applications Engineer
    National Instruments

  • Collecting data from advantech-usb4704 with two different apps at the same time

    I wonder if I can access to Advantech-4704 with two different applications at the same time?
    I use this block in my vis.
    I have enough ports, but inputs are needed in completely different applications. Do I have to close one of them or can they run simultaneously?
    Thankyou!

    Dear gtu,
    as nathand said, usually it is not supported to access the same physical resource simultaneously from multiple programs. In case of DAQmx for instance, you will get an error message which says that the resource is already reserved. I suppose the same would happen with your driver, however it might be worth a try.
    One workaround could be however if you revise your applications and merge the codes if it is possible so that no concurent resource allocation takes place.
    Best Regards,
    Adam Cseh
    Applications/Systems Engineer
    National Instruments

  • Is there a way my two daughters can use the same laptop and have their own individual I Tune music??

    Is there a way my two children can use the same laptop and have their own individual music accounts?

    Do you mean different music collections, camille?
    If so, there's several options given in the following document:
    How to use multiple iPods, iPads, or iPhones with one computer

  • Can I have a Face Time conversation between two Apple devices using the same Apple ID?

    Can I have a Face Time conversation between two Apple devices using the same Apple ID?

    Yes, you can, but the two devices can't have the same e mail address associated with both.  Each, device needs its own unique e mail ADR.  In your case, the iPod can call your iPhone if you use the phone number, but the iPhone can not call your iPod because it must use the e mail address, and if the email address is the same on both, the iPhone will think it's calling itself, so the call will not go through.

  • Can 2 different users with 2 different Iphones use the same itunes to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    can 2 different users with 2 different Iphones use the same itune program to backup each phone separately? if not how can I have a backup for 2 different iphones on the same laptop?

    Here is your answer:
    http://support.apple.com/kb/HT1495

  • I would like to import two different cf cards from two different cameras into the same project/folder and have them be in order of the times they were taken, is there a trick?

    I would like to import two different cf cards from two different cameras into the same project/folder and have them be in the order of the times they were taken, any ideas on how to do this?

    Just import them normally and sort the project by date. They will fall into place. If you tried this and it isn;t happening then make sure the data and times on the two cameras are identical and make sure you are sorting by date and time and nothing else.

Maybe you are looking for

  • Runtime Error in Portal

    Hi All, In one of my iviews, i need to set an input filed as of Pull Down type. Now there are 2 options available either to set the input field as a Dropdown or as a Pull down. When i use Dropdown its working absolutely fine, but when i change it to

  • Why do Creative no longer make Surround Sound Speakers?

    It's been years since Creative made any high-end surround sound speakers. Why has nothing new come out in the meantime? No 7.1 speaker systems or 5.1's in absolutely ages. Can any Creative Rep tell me if Creative will be making 7.1 speaker systems wi

  • Procedural ABAP refactoring or mass source code replacement

    I am trying to change hard coded values from multiple source codes with respective constant names. Is there a tool to find and replace them according to a rules table. I wouldn't mind even if this tool was not in SAP (eg. Eclipse). Thank you in advan

  • Help with case issues in Java 1.3

    Using JDK 1.3 and Windows 98... here is my problem. If I create a class called EventSite.java and another class called eventsite.java (same name, different cases) and then compile them both...I only see the the first class compiled in the directory (

  • N97 camera does not work when i open the len cover

    I think the camera softeware has bug. Tthe camera software shows up when all the menu, and when i click i can see the zoom in/out slider but nothing there is no image showing up on the screen. The screen is dark and it looks like the camera sensor do