#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    10
    Rep 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
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    10
    Rep Power
    0

    Wink HERE IS THE .SQL FILE ATTACHMANT


    THANK YOU IN ADVANCE

    <EOM>
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    10
    Rep Power
    0

    OK CAN SOMEONE TELL ME HOW TO SEND AN ATTACHMENT TO THE BOARD??


    <EOM>
  6. #4
  7. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    Lund, Sweden
    Posts
    5
    Rep 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!
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Annapolis, Maryland US
    Posts
    113
    Rep Power
    16
    What exactly is the problem you're experiencing?

    Is this an Oracle sql file?

IMN logo majestic logo threadwatch logo seochat tools logo