PostgreSQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesPostgreSQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 10th, 2001, 10:01 AM
sean26 sean26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 10 sean26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy 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

Reply With Quote
  #2  
Old May 10th, 2001, 10:18 AM
sean26 sean26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 10 sean26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Wink HERE IS THE .SQL FILE ATTACHMANT

THANK YOU IN ADVANCE

<EOM>

Reply With Quote
  #3  
Old May 10th, 2001, 10:22 AM
sean26 sean26 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 10 sean26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OK CAN SOMEONE TELL ME HOW TO SEND AN ATTACHMENT TO THE BOARD??

<EOM>

Reply With Quote
  #4  
Old May 19th, 2001, 01:27 PM
tigerman tigerman is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2001
Location: Lund, Sweden
Posts: 5 tigerman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to tigerman
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!

Reply With Quote
  #5  
Old May 26th, 2001, 10:53 AM
Kyuzo Kyuzo is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: Annapolis, Maryland US
Posts: 113 Kyuzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
What exactly is the problem you're experiencing?

Is this an Oracle sql file?

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesPostgreSQL Help > I Am Having Problems Running My Sql Code..need Help Please

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap