Wrong codes? or maybe I don't understand the instructions

The instructions said "Write a procedure that will retrieve an
existing record in Enrollment usiing the student and section Ids
and set the grade to a specified value. (use update instead of
insert) and write another procedure that will assign a given
student a given advisor" I tried but cause I got a lot of
errors!!! any help would be appreciated just email me at
[email protected]. thanks!
create sequence room_seq increment by 1;
create sequence faculty_seq increment by 1;
create sequence student_seq increment by 1;
create sequence section_seq increment by 1;
create sequence enrollment_seq increment by 1;
create sequence room_section_seq increment by 1;
create table course(
courseNo varchar2(10),
name varchar2(30),
credits number,
constraint course_pk primary key (courseNo));
insert into course (courseNo, name, credits) values
('CIS405','ADVANCED DATABASE', 5);
insert into course (courseNo, name, credits) values
('CIS349','INTRO TO DATABASE', 5);
COMMIT;
create table room(
roomID number,
bldg char(1) check (bldg IN ('A','B')),
roomNo varchar2(10),
maxCapacity number,
style varchar2(15) check(style IN
('LECTURE','LECTURE/LAB','LAB','OFFICE')),
constraint room_pk primary key (roomID));
insert into room (roomID, bldg, roomNo, maxCapacity, style)
values (room_seq.nextval, 'B', '151A', 50, 'LAB');
insert into room (roomID, bldg, roomNo, maxCapacity, style)
values (room_seq.nextval, 'B', '151B', 50, 'LAB');
commit;
create table faculty(
facultyID number,
lname varchar2(30) not null,
fname varchar2(20) not null,
dept varchar2(5),
officeID number,
phone varchar2(15),
email varchar2(75),
rank char(4) check(rank IN ('INST','ASOC','ASST','FULL','SENR')),
constraint faculty_pk primary key (facultyID),
constraint faculty_fk foreign key (officeID) references room
(roomID));
insert into faculty(facultyID, lname, fname, dept, officeID,
phone, email, rank) values
(faculty_seq.nextval, 'CANNON', 'AMY', 'CIS',
6, '77052149003252', '[email protected]','FULL');
commit;
create table equipment(
equipmentID varchar2(30),
roomID number,
type varchar2(20) check(type IN('OVERHEAD PROJECTOR','PORTABLE
PROJECTOR','LAPTOP CONNECTION','DESKTOP COMPUTER','INTERNET
CONNECTION')),
constraint equipment_pk primary key (equipmentID),
constraint equipment_fk foreign key (roomID) references room
(roomID));
INSERT INTO EQUIPMENT (EQUIPMENTID, ROOMID, TYPE) VALUES ('111',
5, 'DESKTOP COMPUTER');
INSERT INTO EQUIPMENT (EQUIPMENTID, ROOMID, TYPE) VALUES ('222',
5, 'OVERHEAD PROJECTOR');
commit;
create table student(
stuID number,
lname varchar2(30),
fname varchar2(20),
street varchar2(100),
city varchar2(60),
state char(2),
zip varchar2(9),
major varchar2(5) check(major IN
('ACCT','ECT','EET','BIS','BSIT','CIS','TCOM')),
standing varchar2(10) check(standing IN
('FRESHMAN','SOPHOMORE','JUNIOR','SENIOR')),
gpa number(3,2),
advisor number,
constraint student_pk primary key (stuID),
constraint student_FK foreign key (advisor) references faculty
(facultyID));
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'SMITH', 'HEATHER', 'CIS', 'JUNIOR', 3.8,
2);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'ELLIOTT', 'DAVE', 'CIS', 'JUNIOR', 3.65,
2);
commit;
create table section(
sectionID number,
sectionNo char(1),
courseNo varchar2(10),
facultyID number,
term char(4),
curSize number,
maxSize number,
constraint section_pk primary key (sectionID),
constraint section_course_fk foreign key (courseNo) references
course(courseNo),
constraint section_faculty_fk foreign key (facultyID) references
faculty(facultyID));
INSERT INTO SECTION (SECTIONID, SECTIONNO, COURSENO, FACULTYID,
TERM, CURSIZE, MAXSIZE)
VALUES (SECTION_SEQ.NEXTVAL, 'T', 'CIS405', 1, '1001', 17, 30);
INSERT INTO SECTION (SECTIONID, SECTIONNO, COURSENO, FACULTYID,
TERM, CURSIZE, MAXSIZE)
VALUES (SECTION_SEQ.NEXTVAL, 'G', 'CIS405', 2, '1001', 24, 30);
commit;
create table enrollment(
stuSectionID number,
stuID number,
sectionID number,
grade char(1) check(grade IN('A','B','C','D','F','I','W')),
constraint enrollment_pk primary key (stuSectionID),
constraint enrollment_stu_fk foreign key (stuID) references
student(stuID),
constraint enrollment_section_fk foreign key (sectionID)
references section(sectionID));
INSERT INTO ENROLLMENT (STUSECTIONID, STUID, SECTIONID) VALUES
(ENROLLMENT_SEQ.NEXTVAL, 3, 1);
INSERT INTO ENROLLMENT (STUSECTIONID, STUID, SECTIONID) VALUES
(ENROLLMENT_SEQ.NEXTVAL, 3, 8);
commit;
create table room_section(
roomSectionID number,
sectionID number,
roomID number,
day char(3) check(day IN
('MON','TUE','WED','THU','FRI','SAT','SUN')),
hour date,
term char(4),
constraint room_section_pk primary key (roomSectionID),
constraint room_section_section_fk foreign key (sectionID)
references section(sectionID),
constraint room_section_room_fk foreign key (roomID) references
room(roomID));
INSERT INTO ROOM_SECTION (ROOMSECTIONID, SECTIONID, ROOMID, DAY,
HOUR, TERM)
VALUES (ROOM_SECTION_SEQ.NEXTVAL, 1, 3, 'MON', TO_DATE('9:30
AM', 'HH:MI AM'), '1001');
INSERT INTO ROOM_SECTION (ROOMSECTIONID, SECTIONID, ROOMID, DAY,
HOUR, TERM)
VALUES (ROOM_SECTION_SEQ.NEXTVAL, 1, 3, 'MON', TO_DATE('10:30
AM', 'HH:MI AM'), '1001');
commit;
SQL> DESC ENROLLMENT
Name Null? Type
STUSECTIONID NOT NULL NUMBER
STUID NUMBER
SECTIONID NUMBER
GRADE CHAR(1)
SQL> CREATE OR REPLACE PROCEDURE Enrollment(
2 p_grade IN CHAR(1),
3 IS
4 v_stuid NUMBER,
5 v_sectionid NUMBER;
6 BEGIN
7 SELECT student_seq.NEXTVAL
8 INTO v_stuid
9 FROM DUAL;
10 UPDATE student
11 (stuid,
12 sectionid,
13 grade,
14 SET (v_stuid,
15 v_sectionid,
16 UPPER (p_grade),
17 COMMIT;
18 DBMS_OUTPUT.PUT_LINE ('Student added');
19 EXCEPTION
20 WHEN OTHERS THEN
21 DBMS_OUTPUT.PUT_LINE ('An error occurred');
22 END AddStudent;
23 /
I got those errors like above!!! I don't understand what the
instructions said. any assistance would be appreciated!

David,
I am afraid that the
EXCEPTION
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE ('An error occurred');
was my fault. I had intended it as an example to provide only
minimal syntax where no exception handling whatsoever previously
existed. Beau is a student and I am trying to guide him in the
right direction without just writing all of it for him. In
fact, I am afraid I may have already provided too much code
without sufficient explanation. For you and others who may wish
to help, here are the e-mails that provide the background on how
we got to this point, with the most recent on top, starting with
the last resonse I sent to him:
Things that are wrong:
The instructions say to be sure to use the sequence number for
the student's ID, so you should not have p_stuID as an input
parameter. Instead you should create a variable and select the
student_seq.nextval into the variable from the dual table and
use that value to populate the stuid column.
Your input parameters should only have the variable type, not
the size, so just use varchar2 and number.
The check constraints only belong in the script that is used to
create the table, not in your procedure with your input
parameters, so remove them from the procedure.
The order and number of your columns you are inserting into and
values you are inserting must match, so if you insert into fname
then lname, you need to insert the values p_fname then p_lname.
You must either have first name then last name in both or last
name then first name in both, not one way in one and the other
way in the other.
The idea is that when you execute the procedure you specify the
values of the input parameter variable, then use those input
parameter variables to insert the values into the table. You
should not be specifying any specific values anywhere in your
procedure. In other words don't insert 'HEATHER', instead
insert fname, and so on.
You should only have one insert statement. Each time the
procedure is executed, a different set of values will be
provided, and the same insert statement will be used.
Additional suggestions:
Although it is not required, since IN is the default, it is
generally considered to be a good programming practice to use IN
with your input parameters. It just makes the code easier to
read and understand. As you write other code, you will learn to
use OUT for output parameters and IN OUT for parameters that are
both input and output parameters.
It is generally recommended to store all data in upper case,
that is capital letters, so that it is easier to index and
search and avoid duplicates and so on. In order to ensure that
your data is input in upper case, it is a good idea to use the
UPPER function.
Different programmers and companies have different standards
that they use for capitalization, indentation, spacing,
alignment, and so forth to make their code uniform and easier to
read. You may want to look at some various styles and see what
you like or ask what your instructor recommends.
You should add some sort of exception handling section. For
example, if someone attempts to insert a value for standing that
isn't acceptable, then the procedure will fail due to the
constraints and the student will not be added. You probably
want to display some sort of message to the user. You might
also want to display a message if the input is successful.
When you attempt to compile your program and you receive a
message that says "Warning: Procedure created with compilation
errors." or some such thing, then from the SQL> prompt, type
SHOW ERRORS and it will list the error message number, a brief
description of the problem, and the line of code that the
problem occurred on. You can then type LIST and it will list
the code with line numbers, so that you can tell what line
number the error message is referring to.
In the following example, I have fixed the things that were
wrong, formatted it the way I usually do, and added minimal
exception handling and messages. There is a lot more that you
could do. I have also demonstrated how the program can be
tested and the results of proper input and improper input. In
the example below, two students are added correctly, then an
attempt to add another fails because the standing is not valid
and violates a check constraint, because graduate is not
acceptable. After each execution of the procedure, I have
queried the table, so that you can see what was added and what
was not.
SQL> CREATE OR REPLACE PROCEDURE AddStudent
2 (p_fname IN VARCHAR2,
3 p_lname IN VARCHAR2,
4 p_major IN VARCHAR2,
5 p_standing IN VARCHAR2,
6 p_gpa IN NUMBER)
7 IS
8 v_stuid NUMBER;
9 BEGIN
10 SELECT student_seq.NEXTVAL
11 INTO v_stuid
12 FROM DUAL;
13
14 INSERT INTO student
15 (stuid,
16 fname,
17 lname,
18 major,
19 standing,
20 gpa)
21 VALUES (v_stuid,
22 UPPER (p_fname),
23 UPPER (p_lname),
24 UPPER (p_major),
25 UPPER (p_standing),
26 p_gpa);
27
28 COMMIT;
29 DBMS_OUTPUT.PUT_LINE ('Student added');
30 EXCEPTION
31 WHEN OTHERS THEN
32 DBMS_OUTPUT.PUT_LINE ('An error occurred');
33 END AddStudent;
34 /
Procedure created.
SQL> COLUMN fname FORMAT A15
SQL> COLUMN lname FORMAT A15
SQL> SELECT stuid, fname, lname, major, standing, gpa
2 FROM student
3 /
no rows selected
SQL> SET SERVEROUTPUT ON
SQL> EXEC AddStudent ('HEATHER', 'SMITH', 'CIS', 'JUNIOR', 3.8)
Student added
PL/SQL procedure successfully completed.
SQL> SELECT stuid, fname, lname, major, standing, gpa
2 FROM student
3 /
STUID FNAME LNAME MAJOR
STANDING GPA
1 HEATHER SMITH CIS
JUNIOR 3.8
SQL> EXEC AddStudent ('Dave', 'Elliott', 'CIS', 'junior', 3.65)
Student added
PL/SQL procedure successfully completed.
SQL> SELECT stuid, fname, lname, major, standing, gpa
2 FROM student
3 /
STUID FNAME LNAME MAJOR
STANDING GPA
1 HEATHER SMITH CIS
JUNIOR 3.8
2 DAVE ELLIOTT CIS
JUNIOR 3.65
SQL> EXEC AddStudent ('KARL', 'WEBSTER', 'CIS', 'GRADUATE', 3.2)
An error occurred
PL/SQL procedure successfully completed.
SQL> SELECT stuid, fname, lname, major, standing, gpa
2 FROM student
3 /
STUID FNAME LNAME MAJOR
STANDING GPA
1 HEATHER SMITH CIS
JUNIOR 3.8
2 DAVE ELLIOTT CIS
JUNIOR 3.65
SQL>
I am going home now. Sometimes I get a chance to respond to my
e-mail daily and sometimes I may not get to it for a week. It
is better if you post your questions on one of the forums where
you may get more rapid responses from many people. I have
provided links to some forums that I browse below. If you have
internet access, you should be able to just click on them. Some
may require you to register, but they are all free.
The following is a link to the Oracle Technology Network forums,
hosted by Oracle Corporation, where I recommend the SQL and
PL/SQL discussions.
http://forums.oracle.com/forums/homepage.jsp
The following is a link to the PL/SQL forums of the REVEALNET
site, where noted author Steven Feuerstein is one of the SYSOPS,
where, for you, I recommend the "Beginner PL/SQL Developer
Questions" discussions.
http://PIPETALK.REVEALNET.COM/~PLSQL/LOGIN
The following is a link to another forum, where I recommend the
RDBMS, SQL, PL/SQL discussions.
http://www.orafans.com/cgi-bin/orafans/ubb/Ultimate.cgi?
action=intro
I would still like to know where you got my e-mail address, what
class you are taking, who your instructor is, and so forth.
Please do let me know.
Good luck,
Barbara
-----Original Message-----
From:     bseo.ga [SMTP:[email protected]]
Sent:     Wednesday, December 19, 2001 12:19 AM
To:     Boehmer, Barbara A.
Subject:     Re: PL/SQL
Importance:     High
what is wrong with the compilation errors?
CREATE or REPLACE PROCEDURE AddStudent(
p_stuID number,
p_lname varchar2(30),
p_fname varchar2(20),
p_major varchar2(5) check(major IN
('ACCT','ECT','EET','BIS','BSIT','CIS','TCOM')),
P_standing varchar2(10) check(standing IN
('FRESHMAN','SOPHOMORE','JUNIOR','SENIOR')),
P_gpa number(3,2) IS
BEGIN
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'SMITH', 'HEATHER', 'CIS', 'JUNIOR', 3.8,
2);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'ELLIOTT', 'DAVE', 'CIS', 'JUNIOR', 3.65,
2);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'WEBSTER', 'KARL', 'CIS', 'SENIOR', 3.2,
2);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'COX', 'STACEY', 'CIS', 'SENIOR', 2.7, 1);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'HOWARD', 'BRIAN', 'CIS', 'JUNIOR', 3.18,
1);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'DENNIS', 'KELLY', 'CIS', 'SENIOR', 4.0,
1);
COMMIT;
END;
SQL> /
Warning: Procedure created with compilation errors.
----- Original Message -----
From: Boehmer, Barbara A. <mailto:[email protected]>
To: 'bseo.ga' <mailto:[email protected]>
Sent: Tuesday, December 18, 2001 5:17 PM
Subject: RE: PL/SQL
I am not sure what part of it you don't understand.
The first section that you included is a script that you need to
copy and run, in order to create the sequences, tables, and data
that you will need to complete your assignment. You will need
to edit an empty .sql file, copy the script into the file, save
the file, then start the file. For example:
SQL> EDIT test
Type or copy the script and save the file.
SQL> START test
You should see various messages as the items are created. Then
you can use the following commands to see the tables and
sequences that you have created:
SQL> SELECT table_name FROM user_tables;
SQL> SELECT sequence_name FROM user_sequences;
To show the structure of an individual table, for example the
course table:
SQL> DESC course
To show the data in an individual table, like the course table:
SQL> SELECT * FROM course;
In the second section that you have provided, your instructor is
asking you to create three different procedures to do three
different things. To create a procedure, you edit a .sql file,
type the code to create the procedure, save the file, then start
the file. I usually make the .sql file name the same as the
procedure name. So, for example, in number 1, you are asked to
create a procedure named AddStudent, so you would:
SQL> EDIT AddStudent
Type your code.
Save the file.
SQL> START AddStudent
You should receive a message that says:
Procedure created.
Then, to execute your procedure:
SQL> EXEC AddStudent (put your parameter values here)
The basic syntax for creating a pl/sql procedure is:
CREATE OR REPLACE PROCEDURE procedure_name
(put your parameters here)
AS
put your variable declarations here;
BEGIN
put your code that you want to execute here,
like insert statements and update statements;
END procedure_name;
So, if you are trying to create a procedure to add a new student
(which means inserting a row into the student table), you will
need to accept the values (parameters) that you are going to
insert, then insert them:
CREATE OR REPLACE PROCEDURE AddStudent
(p_first .....
p_last .....
p_major .....
p_standing .....
p_GPA .....)
AS
BEGIN
INSERT INTO student .....;
END AddStudent;
I have just given you a starting format and deliberately left
out a lot, because you will learn more by doing it yourself. I
hope that makes things a little clearer.
I would like to know a little more about the class you are
taking. Please let me know where you are going to school, who
your instructor is, what is the name of the class you are
taking, and what book are you using. Also, please let me know
where you got my e-mail address (from one of the forums?)
Good luck,
Barbara
-----Original Message-----
From: bseo.ga [mailto:[email protected]]
Sent: Tuesday, December 18, 2001 5:57 PM
To: [email protected]
Subject: PL/SQL
Importance: High
I don't understand reading the following instructions from my
professor and the books. help would be apppreciated.
-------------create the sequence numbers needed to generate
primary key values
create sequence room_seq increment by 1;
create sequence faculty_seq increment by 1;
create sequence student_seq increment by 1;
create sequence section_seq increment by 1;
create sequence enrollment_seq increment by 1;
create sequence room_section_seq increment by 1;
create table course(
courseNo varchar2(10),
name varchar2(30),
credits number,
constraint course_pk primary key (courseNo));
insert into course (courseNo, name, credits) values
('CIS405','ADVANCED DATABASE', 5);
insert into course (courseNo, name, credits) values
('CIS349','INTRO TO DATABASE', 5);
COMMIT;
create table room(
roomID number,
bldg char(1) check (bldg IN ('A','B')),
roomNo varchar2(10),
maxCapacity number,
style varchar2(15) check(style IN
('LECTURE','LECTURE/LAB','LAB','OFFICE')),
constraint room_pk primary key (roomID));
insert into room (roomID, bldg, roomNo, maxCapacity, style)
values (room_seq.nextval, 'B', '151A', 50, 'LAB');
insert into room (roomID, bldg, roomNo, maxCapacity, style)
values (room_seq.nextval, 'B', '151B', 50, 'LAB');
commit;
create table faculty(
facultyID number,
lname varchar2(30) not null,
fname varchar2(20) not null,
dept varchar2(5),
officeID number,
phone varchar2(15),
email varchar2(75),
rank char(4) check(rank IN
('INST','ASOC','ASST','FULL','SENR')),
constraint faculty_pk primary key (facultyID),
constraint faculty_fk foreign key (officeID) references room
(roomID));
insert into faculty(facultyID, lname, fname, dept, officeID,
phone, email, rank) values
(faculty_seq.nextval, 'CANNON', 'AMY', 'CIS',
6, '77052149003252', '[email protected]','FULL'
<mailto:'[email protected]','FULL'>);
commit;
create table equipment(
equipmentID varchar2(30),
roomID number,
type varchar2(20) check(type IN('OVERHEAD PROJECTOR','PORTABLE
PROJECTOR','LAPTOP CONNECTION','DESKTOP COMPUTER','INTERNET
CONNECTION')),
constraint equipment_pk primary key (equipmentID),
constraint equipment_fk foreign key (roomID) references room
(roomID));
INSERT INTO EQUIPMENT (EQUIPMENTID, ROOMID, TYPE) VALUES ('111',
5, 'DESKTOP COMPUTER');
INSERT INTO EQUIPMENT (EQUIPMENTID, ROOMID, TYPE) VALUES ('222',
5, 'OVERHEAD PROJECTOR');
commit;
create table student(
stuID number,
lname varchar2(30),
fname varchar2(20),
street varchar2(100),
city varchar2(60),
state char(2),
zip varchar2(9),
major varchar2(5) check(major IN
('ACCT','ECT','EET','BIS','BSIT','CIS','TCOM')),
standing varchar2(10) check(standing IN
('FRESHMAN','SOPHOMORE','JUNIOR','SENIOR')),
gpa number(3,2),
advisor number,
constraint student_pk primary key (stuID),
constraint student_FK foreign key (advisor) references faculty
(facultyID));
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'SMITH', 'HEATHER', 'CIS', 'JUNIOR', 3.8,
2);
INSERT INTO STUDENT (STUID, LNAME, FNAME, MAJOR, STANDING, GPA,
ADVISOR) VALUES
(STUDENT_SEQ.NEXTVAL, 'ELLIOTT', 'DAVE', 'CIS', 'JUNIOR', 3.65,
2);
commit;
create table section(
sectionID number,
sectionNo char(1),
courseNo varchar2(10),
facultyID number,
term char(4),
curSize number,
maxSize number,
constraint section_pk primary key (sectionID),
constraint section_course_fk foreign key (courseNo) references
course(courseNo),
constraint section_faculty_fk foreign key (facultyID)
references faculty(facultyID));
INSERT INTO SECTION (SECTIONID, SECTIONNO, COURSENO, FACULTYID,
TERM, CURSIZE, MAXSIZE)
VALUES (SECTION_SEQ.NEXTVAL, 'T', 'CIS405', 1, '1001', 17, 30);
INSERT INTO SECTION (SECTIONID, SECTIONNO, COURSENO, FACULTYID,
TERM, CURSIZE, MAXSIZE)
VALUES (SECTION_SEQ.NEXTVAL, 'G', 'CIS405', 2, '1001', 24, 30);
commit;
create table enrollment(
stuSectionID number,
stuID number,
sectionID number,
grade char(1) check(grade IN('A','B','C','D','F','I','W')),
constraint enrollment_pk primary key (stuSectionID),
constraint enrollment_stu_fk foreign key (stuID) references
student(stuID),
constraint enrollment_section_fk foreign key (sectionID)
references section(sectionID));
INSERT INTO ENROLLMENT (STUSECTIONID, STUID, SECTIONID) VALUES
(ENROLLMENT_SEQ.NEXTVAL, 3, 1);
INSERT INTO ENROLLMENT (STUSECTIONID, STUID, SECTIONID) VALUES
(ENROLLMENT_SEQ.NEXTVAL, 3, 8);
commit;
create table room_section(
roomSectionID number,
sectionID number,
roomID number,
day char(3) check(day IN
('MON','TUE','WED','THU','FRI','SAT','SUN')),
hour date,
term char(4),
constraint room_section_pk primary key (roomSectionID),
constraint room_section_section_fk foreign key (sectionID)
references section(sectionID),
constraint room_section_room_fk foreign key (roomID)
references room(roomID));
INSERT INTO ROOM_SECTION (ROOMSECTIONID, SECTIONID, ROOMID, DAY,
HOUR, TERM)
VALUES (ROOM_SECTION_SEQ.NEXTVAL, 1, 3, 'MON', TO_DATE('9:30
AM', 'HH:MI AM'), '1001');
INSERT INTO ROOM_SECTION (ROOMSECTIONID, SECTIONID, ROOMID, DAY,
HOUR, TERM)
VALUES (ROOM_SECTION_SEQ.NEXTVAL, 1, 3, 'MON', TO_DATE('10:30
AM', 'HH:MI AM'), '1001');
commit;
The lab notes from my professor said
1. your system will often need to create a new student. Write
PL/SQL code for an object named AddStudent that will take values
for first and last name, major, standing and GPA and add a new
record in the Student table. Since advisors aren't assigned at
registration time, we'll add their advisor at a later date.
Don't worry about the student's address. Be sure to use the
sequence number for the student's ID.
2. Write a procedure that will retrieve an existing record in
Enrollment usiing the student and section Ids and set the grade
to a specified value. (use update instead of insert)
3. Write another procedure that will assign a given student a
given advisor.

Similar Messages

  • TS2446 how can I get back into Itunes store so that I can make a purchase - my account was disabled and now I cannot get back in - don't understand the instructions!!!!!!

    How can I access itunes store  after this Apple ID was disabled in January 2013

    Contact iTunes store support for assistance: http://www.apple.com/emea/support/itunes/contact.html.  They will be able to tell you what needs to be done to enable it again.

  • HT1338 Can't get many videos sent by email. Get movie format not recognized. Went to Tell me more, but don't understand the instructions.

    Help me get videos and movies on my MacBook?

    Hi Peter MacGregor,
    That is odd, is there a restriction on attachments in the mail client?
    View > View Attachments Inline?
    Matt's blog is pretty awesome: [http://thunderbirdtweaks.blogspot.com/2011/07/file-attachments-in-thunderbird.html]
    [http://forums.mozillazine.org/viewtopic.php?f=39&t=710775]

  • Filter don't work or I don't understand the workflow

    Hi.
    Mac OS X 10.6.8
    Aperture 3.2.4
    I use AP for long time without problems.
    Maybe I don't understand the workflow of filters.
    I edit some photos, make HDRs and use external Plugins from Nik.
    When I use the filter to show TIFFs or edit with external applications I don't see the fotos when I use both rules.
    When I use only TIFFs I see TIFFs but only BlackWhite fotos. The colored HDRs also TIFFs but I don't see it.
    When I use only External Edit I see HDRs but only colored HDRs.
    When I use both I see nothing, see screenshot.
    Make I a mistake  ?
    I will not use keyword AP should do his job.
    Jochen (.de)

    Maybe my question is not clear.
    A additionally screenshot is more clear.

  • Which Mac Pro? More cores=slower speeds? And most of us know the speed matters or FPU for music and I don't understand the faster is for the least amount of procs. And while I get the whole rendering thing and why it makes sense.

    Which Mac Pro? More cores=slower speeds? And most of us know the speed matters or FPU for music and I don't understand the faster is for the least amount of procs. And while I get the whole rendering thing and why it makes sense.
    The above is what the bar says. It's been a while and wondered, maybe Apple changed the format for forums. Then got this nice big blank canvas to air my concerns. Went to school for Computer Science, BSEE, even worked at Analog Devices in Newton Massachusetts, where they make something for apple. 
    The bottom line is fast CPU = more FPU = more headroom and still can't figure out why the more cores= the slower it gets unless it's to get us in to a 6 core then come out with faster cores down the road or a newer Mac that uses the GPU. Also. Few. I'm the guy who said a few years ago Mac has an FCP that looks like iMovie on Steroids. Having said that I called the campus one day to ask them something and while I used to work for Apple, I think she thought I still did as she asked me, "HOW ARE THE 32 CORES/1DYE COMING ALONG? Not wanting to embarrass her I said fine, fine and then hung up.  Makes the most sense as I never quite got the 2,6,12 cores when for years everything from memory to CPU's have been, in sets of 2 to the 2nd power.  2,4,8,16,32,64,120,256,512, 1024, 2048,4196,8192, 72,768.  Wow. W-O-W and will be using whatever I get with Apollo Quad. 
    Peace to all and hope someone can point us in THE RIGHT DIRECTION.  THANK YOU

    Thanks for your reply via email/msg. He wrote:
    If you are interested in the actual design data for the Xeon processor, go to the Intel site and the actual CPU part numbers are:
    Xeon 4 core - E5.1620v2
    Xeon 6 core - E5.1650v2
    Xeon 8 core - E5.1680v2
    Xeon 12 core - E5.2697v2
    I read that the CPU is easy to swap out but am sure something goes wrong at a certain point - even if solderedon they make material to absorb the solder, making your work area VERY clean.
    My Question now is this, get an 8 core, then replace with 2 3.7 QUAD CHIPS, what would happen?
    I also noticed that the 8 core Mac Pro is 3.0 when in fact they do have a 3.4 8 core chip, so 2 =16? Or if correct, wouldn't you be able to replace a QUAD CHIP WITH THAT?  I;M SURE THEY ARE UO TO SOMETHING AS 1) WE HAVE SEEN NO AUDIO FPU OR PERHAPS I SHOULD CHECK OUT PC MAKERS WINDOWS machines for Sisoft Sandra "B-E-N-C-H-M-A-R-K-S" -
    SOMETHINGS UP AND AM SURE WE'LL ALL BE PLEASED, AS the mac pro      was announced Last year, barely made the December mark, then pushed to January, then February and now April.
    Would rather wait and have it done correct than released to early only to have it benchmarked in audio and found to be slower in a few areas- - - the logical part of my brain is wondering what else I would have to swap out as I am sure it would run, and fine for a while, then, poof....
    PEACE===AM SURE APPLE WILL BLOW US AWAY - they have to figure out how to increase the power for 150 watts or make the GPU work which in regard to FPU, I thought was NVIDIA?

  • Don't understand the workflow in e-commerce

    Is there a place to see the backend of an online store working, or to see how it's supposed to be set up? My previous experience with shipping cart systems is that once the order is placed, it gives you the ability to change the status of the order, from something like "processing" to "shipped" or maybe "In Progress". Once you change it to "Shipped", it updates the customer via email and it takes the order off any WIP reports.
    I setup the online store in a dummy company, and ordered something from it, using "COD" for payment, then I went to see how all that worked. I can't see anything that moves the order through the process to the end. It looks like that might be something I have to setup with workflows. Is that correct? If not, how does the order go from a new order to a shipped order?
    I'm sure it does it or can do it, I just don't understand the way it all works. A tutorial or demo would be great, but I haven't been able to locate one.
    Thanks in advance for any help!

    Hi,
    The order status is changed as explained here -> http://kb.worldsecuresystems.com/kb/order-status.html
    and payment is applied to the cash order as explained here -> http://kb.worldsecuresystems.com/kb/order-payments.html
    Hope that helps!
    Please let us know for any further assistance.
    Kind Regards,

  • I don't understand the thing you call live bookmarks never used it, and most forums I have used notify VIA E-mail not giving out my E-mail address information when a reply has been made to the thread in question.

    So how do I get notified of updates in this forum? As I said: I don't understand the thing you call LIVE BOOKMARKS I have never used them, and most forums I have used notify VIA E-mail not giving out my E-mail address, or other private information when a reply has been made to the thread in question, so how do I get notified of updates in this forum? I have seen no normal options for setting my viewing preferences used for this forum. Thank You.

    Thanks for your reply via email/msg. He wrote:
    If you are interested in the actual design data for the Xeon processor, go to the Intel site and the actual CPU part numbers are:
    Xeon 4 core - E5.1620v2
    Xeon 6 core - E5.1650v2
    Xeon 8 core - E5.1680v2
    Xeon 12 core - E5.2697v2
    I read that the CPU is easy to swap out but am sure something goes wrong at a certain point - even if solderedon they make material to absorb the solder, making your work area VERY clean.
    My Question now is this, get an 8 core, then replace with 2 3.7 QUAD CHIPS, what would happen?
    I also noticed that the 8 core Mac Pro is 3.0 when in fact they do have a 3.4 8 core chip, so 2 =16? Or if correct, wouldn't you be able to replace a QUAD CHIP WITH THAT?  I;M SURE THEY ARE UO TO SOMETHING AS 1) WE HAVE SEEN NO AUDIO FPU OR PERHAPS I SHOULD CHECK OUT PC MAKERS WINDOWS machines for Sisoft Sandra "B-E-N-C-H-M-A-R-K-S" -
    SOMETHINGS UP AND AM SURE WE'LL ALL BE PLEASED, AS the mac pro      was announced Last year, barely made the December mark, then pushed to January, then February and now April.
    Would rather wait and have it done correct than released to early only to have it benchmarked in audio and found to be slower in a few areas- - - the logical part of my brain is wondering what else I would have to swap out as I am sure it would run, and fine for a while, then, poof....
    PEACE===AM SURE APPLE WILL BLOW US AWAY - they have to figure out how to increase the power for 150 watts or make the GPU work which in regard to FPU, I thought was NVIDIA?

  • HT4847 Don't understand the purpose of icloud storage

    Hello,
    Maybe I'm alone on this one, but even after reading Apple's articles on iCloud and iCloud storage, I don't understand the purpose of it.  I am only using 23.5 of a 25 Go storage (all of it is backup of all my apps and files (not sure the movies and music is covered even though the iPad general setting info implies this since I'm in Europe) and yet, if I delete the app files from the iPad, I also delete them from the cloud.  So for instance, I want to update to the latest iOS and it says I'm short 312 Mo and need to delete stuff from the iPad. 
    If I understand correctly, the only way to do this safely is to make sure a duplicate is on my PC via iTunes. So then what do I need the iCloud extra storage for (for which I am paying)?  Is this like a SkyDrive or Dropbox or not???
    Please someone clear this up in simple, step-by-step type language.  I feel like I'm getting a round around when I read or take to Apple folks via email.  Thanks in advance!

    Movies, music and apps are not part of your back ups, they are all available already on Apples servers as part of the iTunes Store. Backups consist of settings, photos and other data which cannot be obtained from elsewhere.
    iCloud is not general online storage like Dropbox, in addition to back ups it keeps all your app data from apps such as contacts, calendars etc so it can be accessed by all your devices and keep them in sync. But in keeping with the mobile system structure the data is accessed through the app rather than a folder structure.

  • Can anyone help me change fonts and size on my page? I don't understand the class questions?

    Can anyone help me change fonts and size on my page? I don't understand the class questions? All I want to do is change the font and size of a table or div.
    http://www.allgearinc.com/AG12SSWL-Swift.htm -One problem page

    If you want to change the fonts of the entire page then this code will do the trick:
    body {
        font-size: 16pt;
        color: silver;
         font-family: whatever, goes, here;
    If you want to change the fonts of ALL tables on a page then the code is something like this:
    table {
        font-size: 20pt;
        font-family: "Courier New", Courier, monospace;
        font-style: italic;
        font-weight: bold;
    what exactly do you want to change?  Can you be a bit specific so that Ben or Ken can give you the exact code and tell you about the short-hand method to write the code in one line.
    Have you bought a book on CSS yet?  If not, it is a good idea to get one as a reference.  Eric Meyer writes good books on CSS.

  • I just downloaded Adobe Acrobat XI Pro, I am in the install process now and I am getting an Error message, Error 1303, stating I need to log on as an administrator ... this is my computer so I don't understand the issue??

    I just downloaded Adobe Acrobat XI Pro, I am in the install process now and I am getting an Error message, Error 1303, stating I need to log on as an administrator ... this is my computer so I don't understand the issue??

    Hi MAX22,
    Even though it's your computer but your user account might not have sufficient privileges to install the software.
    Please try the following :
    > Enable the hidden Admin Account on Windows 7 ( Ref :  http://www.howtogeek.com/howto/windows-vista/enable-the-hidden-administrator-account-on-wi ndows-vista/ )
    Reboot and try installing in the new enabled Admin user account and check.
    Regards,
    Rave

  • Java tutorial - helps, problem  is i don't understand the API

    I don't understand the JAVA Tutorials or the API

    Take two steps back.
    Buy a book on basic Java Programming. You need to understand the concepts behind programming before you should start reading the API.
    But kudos for at least trying to read the API.
    Now look at the column on the left, and follow the link called [url http://developer.java.sun.com/developer/onlineTraining/] Tutorials 
    and then the link titled [url http://java.sun.com/docs/books/tutorial/index.html]The Java Tutorial (Java Series).
    And finally read through the sections starting with [url http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html]Your First Cup of Java.
    Then once you have been through all of that, come back and ask for clarification
    on any specific points that you have trouble understanding.
    Finally (Because the Finally always gets executed) Try taking a class in java programming.
    regards

  • HT5463 Don't understand the Silence section in Do Not Disturb.  I do NOT want to silence calls at any time.  How do I achieve this?

    Don't understand the Silence section in Do Not Disturb.  I do NOT want to silence the phone at all.  I have entered Allow Calls from 'Everyone". 

    If you do not want to silence the phone at all, you just need to set both Manual and Sheduled to off (not green). Those two switches turn Do Not Disturb on and off. The "Silence" section is only relevant when Do Not Disturb is On and determines whether it is active only while the screen is locked and Do Not Disturb is On or at all times that Do Not Disturb is On. Also, if Do Not Disturb is Off, it doesn't matter what the "Allow calls from" is set to.
    If Do Not Disturb is On you will see a moon icon on the right side of the status bar (somewhere left of the battery %). More information at: http://support.apple.com/kb/HT5463

  • HT204088 I don't understand the charges on my account for Itunes.  When I asked for history online, I get no results.  Please help.

    I don't understand the charges on my credit card for itunes.  please help

    Your credit card is only linked to one iTunes account, and you've checked the purchase history on it via your computer's iTunes as per the page that you posted from ? And you don't have iTunes Match or any auto-renewing subscriptions (I'm not sure if they show on the purchase history or not, I don't have any so I can't check) : http://support.apple.com/kb/HT4098
    And you haven't added or changed your credit card details on your iTunes account ? Each time that you do so a small temporary store holding charge may be applied to check that the card details are correct and valid and that it's registered to exactly the same name and address as on your iTunes account - it should disappear off your account within a few days or so. Store holding charge : http://support.apple.com/kb/HT3702
    If you can't find anything on your account's purchase history then you should probably contact your card issuer and get the card cancelled and replaced. You can also contact iTunes Support via this page : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption
    I don't know what your second post means.

  • My phone randomly shut off. When I turned it back on it said it needed to restore, to plug it into itunes. When I did, and tried to restore it, it failed with a code 21. I have followed all the instructions, it still isn't working. Please help!

    My phone randomly shut off. When I turned it back on it said it needed to restore, to plug it into itunes. When I did, and tried to restore it, it failed with a code 21. I have followed all the instructions, it still isn't working. I've uninstalled and reinstalled all that the steps told me to, I've updated everything in my computer. I don't know what else to do. My phone will just show the apple sign and the itunes plug in sign.

    Hey Carolefromthelou,
    The following link will provide steps on how to best remove all traces of iTunes from your PC and then reinstall it:
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    http://support.apple.com/kb/HT1923
    Welcome to Apple Support Communities!
    Best,
    Delgadoh

  • Maybe I don't understand quizzing in captivate 6?

    In my project I have several quizes that I don't really want to score but I still want the user to get feedback on right or wrong answers. Also they don't have to actually answer the quiz. They can skip ahead or leave the quiz and go to another page. The last twist is the project is broken into 4 modules that would be taken by 4 different groups. Each may access the same quiz again to just test knowledge. It all appears to be working, but during testing it's been reported that once a set of questions is answered they are locked. So if a user goes throught mod 1 and take a quiz then goes into mod 2 and clicks the quiz it shows up taken. I've read a few post and they show how you can leave a quiz and come back to finish. They show how on the results page you can have a retake button. But I haven't found where I can reset the entire quiz before the person enters into it?

    Mark,
    Your expectations of how this "should be able to work" are entirely reasonable.
    I've been struggling with Captivate's quizzing model ever since I abandoned a custom Flash elearning shell to use Captivate in order to support iOS.
    It would be nice if Captivate questions had an option like:
    "Reset question on enter slide".
    In fact, if you only need HTML5 output, you can do this:  In the "On enter" slide properties box, execute the following javascript on every quiz slide "resetQuizData()". 
    I wish I could find the corresponding function call for swf output so I could create a widget that would do the same.
    Note that all questions get reset once you show the quiz results screen.
    One hack I've been playing with is to jump to the Quiz Results screen after answering every question that won't be in a "final scored quiz". For these question screens, simply set points to zero.  The trick is, use an advanced action to jump to the quiz results screen and then jump back to the page that follows the jump page.
    Then in the final quiz, lock the student into the final quiz (by hiding the playbar) until the student finishes all the final quiz questions.

Maybe you are looking for