The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Databases
> PostgreSQL Help
|
I Am Having Problems Running My Sql Code..need Help Please
Discuss I Am Having Problems Running My Sql Code..need Help Please in the PostgreSQL Help forum on Dev Shed. I Am Having Problems Running My Sql Code..need Help Please PostgreSQL Help forum discussing administration, SQL syntax, or other PostgreSQL-related topics. PostgreSQL provides enterprise level database functionality at open source prices.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

May 10th, 2001, 10:01 AM
|
|
Junior Member
|
|
Join Date: May 2001
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
I Am Having Problems Running My Sql Code..need Help Please
HELLO BOARD,
I AM HAVING PROBLEMS WITH MY CODE......HERE IS A COPY OF IT AND I CAN ALSO SEND IT A AN ATTACHMENT VIA EMAIL.... THANK YOU IN ADVANCE
set pause on
spool output-file
echo on
rem Asfa Taitt
rem Project2
drop table T_ENROLL;
drop table T_SECTION;
drop table T_STUDENT;
drop table T_INSTRUCTOR;
drop table T_COURSES;
drop table T_SCHOOL;
drop table T_MAJOR;
create table T_SCHOOL (School char(4) not null,
primary key (School));
create table T_MAJOR (Major char(4) not null,
School char(4),
primary key (Major),
foriegn key (School) references T_SCHOOL);
create table T_STUDENT (Student_No integer not null,
Student_Name Char(20),
Major char(4),
primary key (Student_No),
foriegn key (Major) references T_MAJOR);
create table T_INSTRUCTOR (Instructor_No integer not null,
Instructor_Name Char(20),
School char(4),
primary key (Instructor_No),
foriegn key (School) references T_SCHOOL);
create table T_COURSES (Course Char(7) not null,
MAX_Allowed Integer,
Credit_Hours Integer,
GOA Char(1),
primary key (Course));
create table T_SECTION (semester Char(7),
School char(4),
Course Char(7),
Sec_No Char(4) not null,
Sec_Loc char(5),
Section_Time char(13),
Instructor_No integer,
primary key (Sec_No),
foreign key (Instructor_No) references T_INSTRUCTOR,
foreign key (Course) references T_COURSES,
foreign key (School) references T_SCHOOL);
create table T_ENROLL (
Semester Char(7),
Course Char(7),
Sec_No Char(4),
Student_No integer,
GOS Char(1),
Major char(4),
foreign key (Student_No) references T_STUDENT,
foreign key (Course) references T_COURSES,
foreign key (Sec_No) references T_SECTION,
foriegn key (Major) references T_MAJOR);
insert into T_COURSES values ('IFSM410',30,3,'R');
insert into T_COURSES VALUES ('CMIS300',30,3,'R');
insert into T_INSTRUCTOR values (111223333,'BABISKIN ROBERT G');
insert into T_INSTRUCTOR values (222997777,'CODD TED E');
insert into T_SECTION values ('SPR01','BUS','IFSM410','4031','RM32','TUTH3:30-5:00',111223333);
insert into T_SECTION values ('SPR01','ENG','CMIS300','4011','RM407','MWF 1:30-2:30',222997777);
insert into T_STUDENT values (222445555,'HARRIS JOHN H');
insert into T_STUDENT values (215557777,'LITTLE BOB K');
insert into T_STUDENT values (517443333,'JONES JANE G');
insert into T_ENROLL values ('SPR01','IFSM410','4031',222445555,'R','IFSM');
insert into T_ENROLL values ('SPR01','CMIS300','4011',215557777,'R','CMIS');
insert into T_ENROLL values ('SPR01','CMIS300','4011',222445555,'R','IFSM');
insert into T_ENROLL values ('SPR01','CMIS300','4011',517443333,'R','CMIS');
insert into T_ENROLL values ('SPR01','IFSM410','4031',517443333,'R','CMIS');
DELETE from T_ENROLL
WHERE T_ENROLL.Student_No = 222445555 and T_ENROLL.Course = 'IFSM410';
commit;
select * from T_INSTRUCTOR;
select * from T_COURSES;
spool ofF
|

May 10th, 2001, 10:18 AM
|
|
Junior Member
|
|
Join Date: May 2001
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
HERE IS THE .SQL FILE ATTACHMANT
THANK YOU IN ADVANCE
<EOM>
|

May 10th, 2001, 10:22 AM
|
|
Junior Member
|
|
Join Date: May 2001
Posts: 10
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
OK CAN SOMEONE TELL ME HOW TO SEND AN ATTACHMENT TO THE BOARD??
<EOM>
|

May 19th, 2001, 01:27 PM
|
|
Member
|
|
Join Date: Apr 2001
Location: Lund, Sweden
Posts: 5
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
what kind of problems?
Hello Sean!
First, WHOLE SENTENCES OF UPPERCASE IS CONSIDERED AS SCREAMING (or talking very loud). This will irritate some people and make them ignore you instead of paying attention to your text (which I suppose was your intention).
I'm not a PostgreSQL-guru so I will not be able to help you with your problem. But if you want to get help with a problem you should specify what kind of problems you are having. After reading your post I haven't got a clue what kind of problems you are having.
Try again, perhaps some of the real PostgreSQL-demigods drop by to help you.
Good luck!
|

May 26th, 2001, 10:53 AM
|
|
Contributing User
|
|
Join Date: Oct 1999
Location: Annapolis, Maryland US
Posts: 113
Time spent in forums: < 1 sec
Reputation Power: 14
|
|
|
What exactly is the problem you're experiencing?
Is this an Oracle sql file?
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|