darkwarrior 0 Report post Posted October 24, 2004 I was just curious what I was limited to. I'm attempting to build a site there but since I go to uni part time and study databases, I thought I could use a table to my mysql to allow me to run a few scripts and save them for work.I'm not sure if that is against TOS or not, if so I apologise and won't continue.However, when I tried to run the code given to me to create the table I am meant to work on it basically just mocks my syntax and spits in my face.The syntax is: REM Order of creation from hr_main[/br]REM changed by Pam Quick July 2003[br]SET SERVEROUTPUT ON VERIFY OFF[/br]rem drop all tables views[br]DROP VIEW emp_details_view;[/br]DROP SEQUENCE departments_seq;[br]DROP SEQUENCE employees_seq;[/br]DROP SEQUENCE locations_seq;[br]DROP TABLE regions CASCADE CONSTRAINTS;[/br]DROP TABLE departments CASCADE CONSTRAINTS;[br]DROP TABLE locations CASCADE CONSTRAINTS;[/br]DROP TABLE jobs CASCADE CONSTRAINTS;[br]DROP TABLE job_grades CASCADE CONSTRAINTS;[/br]DROP TABLE job_history CASCADE CONSTRAINTS;[br]DROP TABLE employees CASCADE CONSTRAINTS;[/br]DROP TABLE countries CASCADE CONSTRAINTS; [br]DROP TABLE job_grades CASCADE CONSTRAINTS;[/br]rem create all tables[br]SET FEEDBACK 1[/br]SET NUMWIDTH 10[br]SET LINESIZE 80[/br]SET PAGESIZE 100[br]SET ECHO OFF [/br]REM ********************************************************************[br]REM Create the REGIONS table to hold region information for locations[/br]REM HR.LOCATIONS table has a foreign key to this table.[br]Prompt ****** Creating REGIONS table ....[/br]CREATE TABLE regions[br] ( region_id NUMBER [/br] CONSTRAINT region_id_nn NOT NULL [br] , region_name VARCHAR2(25) [/br] );[br]CREATE UNIQUE INDEX reg_id_pk[/br]ON regions (region_id);[br]ALTER TABLE regions[/br]ADD ( CONSTRAINT reg_id_pk[br] PRIMARY KEY (region_id)[/br] );[br]REM ********************************************************************[/br]REM Create the COUNTRIES table to hold country information for customers[br]REM and company locations. [/br]REM OE.CUSTOMERS table and HR.LOCATIONS have a foreign key to this table.[br]Prompt ****** Creating COUNTRIES table ....[/br]CREATE TABLE countries [br] ( country_id CHAR(2) [/br] CONSTRAINT country_id_nn NOT NULL [br] , country_name VARCHAR2(40) [/br] , region_id NUMBER [br] , CONSTRAINT country_c_id_pk [/br] PRIMARY KEY (country_id) [br] ) [/br] ORGANIZATION INDEX; [br][/br]ALTER TABLE countries[br]ADD ( CONSTRAINT countr_reg_fk[/br] FOREIGN KEY (region_id)[br] REFERENCES regions(region_id) [/br] );[br]REM ********************************************************************[/br]REM Create the LOCATIONS table to hold address information for company departments.[br]REM HR.DEPARTMENTS has a foreign key to this table.[/br]Prompt ****** Creating LOCATIONS table ....[br]CREATE TABLE locations[/br] ( location_id NUMBER(4)[br] , street_address VARCHAR2(40)[/br] , postal_code VARCHAR2(12)[br] , city VARCHAR2(30)[/br] CONSTRAINT loc_city_nn NOT NULL[br] , state_province VARCHAR2(25)[/br] , country_id CHAR(2)[br] );[/br]CREATE UNIQUE INDEX loc_id_pk[br]ON locations (location_id);[/br]ALTER TABLE locations[br]ADD ( CONSTRAINT loc_id_pk[/br] PRIMARY KEY (location_id)[br] );[/br]Rem Useful for any subsequent addition of rows to locations table[br]Rem Starts with 3300[/br]CREATE SEQUENCE locations_seq[br] START WITH 3300[/br] INCREMENT BY 100[br] MAXVALUE 9900[/br] NOCACHE[br] NOCYCLE;[br]REM ********************************************************************[/br]REM Create the DEPARTMENTS table to hold company department information.[/br]REM HR.EMPLOYEES and HR.JOB_HISTORY have a foreign key to this table.[br]Prompt ****** Creating DEPARTMENTS table ....[/br]CREATE TABLE departments[br] ( department_id NUMBER(4)[/br] , department_name VARCHAR2(30)[br] CONSTRAINT dept_name_nn NOT NULL[/br] , manager_id NUMBER(6)[br] , location_id NUMBER(4)[br] );[/br]CREATE UNIQUE INDEX dept_id_pk[/br]ON departments (department_id);[br]ALTER TABLE departments[/br]ADD ( CONSTRAINT dept_id_pk[br] PRIMARY KEY (department_id)[/br] , CONSTRAINT dept_loc_fk[br] FOREIGN KEY (location_id)[/br] REFERENCES locations (location_id)[br] );[/br]Rem Useful for any subsequent addition of rows to departments table[br]Rem Starts with 280 [/br]CREATE SEQUENCE departments_seq[br] START WITH 280[/br] INCREMENT BY 10[br] MAXVALUE 9990[/br] NOCACHE[br] NOCYCLE;[br]REM ********************************************************************[/br]REM Create the JOBS table to hold the different names of job roles within the company.[/br]REM HR.EMPLOYEES has a foreign key to this table.[br]Prompt ****** Creating JOBS table ....[/br]CREATE TABLE jobs[br] ( job_id VARCHAR2(10)[/br] , job_title VARCHAR2(35)[br] CONSTRAINT job_title_nn NOT NULL[/br] , min_salary NUMBER(6)[br] , max_salary NUMBER(6)[br] );[/br]CREATE UNIQUE INDEX job_id_pk [/br]ON jobs (job_id);[br]ALTER TABLE jobs[/br]ADD ( CONSTRAINT job_id_pk[br] PRIMARY KEY(job_id)[/br] );[br]REM ********************************************************************[/br]REM Create the EMPLOYEES table to hold the employee personnel [br]REM information for the company.[/br]REM HR.EMPLOYEES has a self referencing foreign key to this table.[br]Prompt ****** Creating EMPLOYEES table ....[/br]CREATE TABLE employees[br] ( employee_id NUMBER(6)[/br] , first_name VARCHAR2(20)[br] , last_name VARCHAR2(25)[/br] CONSTRAINT emp_last_name_nn NOT NULL[br] , email VARCHAR2(25)[/br] CONSTRAINT emp_email_nn NOT NULL[br] , phone_number VARCHAR2(20)[/br] , hire_date DATE[br] CONSTRAINT emp_hire_date_nn NOT NULL[/br] , job_id VARCHAR2(10)[br] CONSTRAINT emp_job_nn NOT NULL[/br] , salary NUMBER(8,2)[br] , commission_pct NUMBER(2,2)[/br] , manager_id NUMBER(6)[br] , department_id NUMBER(4)[/br] , CONSTRAINT emp_salary_min[br] CHECK (salary > 0) [/br] , CONSTRAINT emp_email_uk[br] UNIQUE (email)[/br] ); [br][/br]CREATE UNIQUE INDEX emp_emp_id_pk[br]ON employees (employee_id);[br][/br][/br]ALTER TABLE employees[br]ADD ( CONSTRAINT emp_emp_id_pk[/br] PRIMARY KEY (employee_id)[br] , CONSTRAINT emp_dept_fk[/br] FOREIGN KEY (department_id)[br] REFERENCES departments[/br] , CONSTRAINT emp_job_fk[br] FOREIGN KEY (job_id)[/br] REFERENCES jobs (job_id)[br] , CONSTRAINT emp_manager_fk[/br] FOREIGN KEY (manager_id)[br] REFERENCES employees[/br] );[br][/br]ALTER TABLE departments[br]ADD ( CONSTRAINT dept_mgr_fk[/br] FOREIGN KEY (manager_id)[br] REFERENCES employees (employee_id)[br] );[/br]Rem Useful for any subsequent addition of rows to employees table[/br]Rem Starts with 207 [br]CREATE SEQUENCE employees_seq[/br] START WITH 207[br] INCREMENT BY 1[/br] NOCACHE[br] NOCYCLE;[br]REM ********************************************************************[/br]REM Create the JOB_HISTORY table to hold the history of jobs that [/br]REM employees have held in the past.[br]REM HR.JOBS, HR_DEPARTMENTS, and HR.EMPLOYEES have a foreign key to this table.[/br]Prompt ****** Creating JOB_HISTORY table ....[br]CREATE TABLE job_history[/br] ( employee_id NUMBER(6)[br] CONSTRAINT jhist_employee_nn NOT NULL[/br] , start_date DATE[br] CONSTRAINT jhist_start_date_nn NOT NULL[/br] , end_date DATE[br] CONSTRAINT jhist_end_date_nn NOT NULL[/br] , job_id VARCHAR2(10)[br] CONSTRAINT jhist_job_nn NOT NULL[/br] , department_id NUMBER(4)[br] , CONSTRAINT jhist_date_interval[/br] CHECK (end_date > start_date)[br] );[/br]CREATE UNIQUE INDEX jhist_emp_id_st_date_pk [br]ON job_history (employee_id, start_date);[/br]ALTER TABLE job_history[br]ADD ( CONSTRAINT jhist_emp_id_st_date_pk[/br] PRIMARY KEY (employee_id, start_date)[br] , CONSTRAINT jhist_job_fk[br] FOREIGN KEY (job_id)[/br] REFERENCES jobs[/br] , CONSTRAINT jhist_emp_fk[br] FOREIGN KEY (employee_id)[/br] REFERENCES employees[br] , CONSTRAINT jhist_dept_fk[/br] FOREIGN KEY (department_id)[br] REFERENCES departments[/br] );[br]REM ********************************************************************[/br]REM Create the EMP_DETAILS_VIEW that joins the employees, jobs, [br]REM departments, jobs, countries, and locations table to provide details[/br]REM about employees.[br][/br]Prompt ****** Creating EMP_DETAILS_VIEW view ...[br][/br]CREATE OR REPLACE VIEW emp_details_view[br] (employee_id,[/br] job_id,[br] manager_id,[/br] department_id,[br] location_id,[/br] country_id,[br] first_name,[/br] last_name,[br] salary,[/br] commission_pct,[br] department_name,[/br] job_title,[br] city,[/br] state_province,[br] country_name,[/br] region_name)[br]AS SELECT[/br] e.employee_id, [br] e.job_id, [/br] e.manager_id, [br] e.department_id,[/br] d.location_id,[br] l.country_id,[/br] e.first_name,[br] e.last_name,[/br] e.salary,[br] e.commission_pct,[/br] d.department_name,[br] j.job_title,[/br] l.city,[br] l.state_province,[/br] c.country_name,[br] r.region_name[/br]FROM[br] employees e,[/br] departments d,[br] jobs j,[/br] locations l,[br] countries c,[/br] regions r[br]WHERE e.department_id = d.department_id[/br] AND d.location_id = l.location_id[br] AND l.country_id = c.country_id[/br] AND c.region_id = r.region_id[br] AND j.job_id = e.job_id [/br]WITH READ ONLY;[br][/br]rem[br]rem job-grades table added by p.quick[/br]rem[br]CREATE TABLE JOB_GRADES[/br](GRADE_LEVEL VARCHAR2(3) PRIMARY KEY,[br]LOWEST_SAL NUMBER(6),[/br]HIGHEST_SAL NUMBER(6));[br][/br]COMMIT;[br]rem populate all tables[/br]REM ***************************insert data into the REGIONS table[br]Prompt ****** Populating REGIONS table ....[/br]INSERT INTO regions VALUES [br] ( 1[/br] , 'Europe' [br] );[/br]INSERT INTO regions VALUES [br] ( 2[/br] , 'Americas' [br] );[/br]INSERT INTO regions VALUES [br] ( 3[/br] , 'Asia' [br] );[/br]INSERT INTO regions VALUES [br] ( 4[/br] , 'Middle East and Africa' [br] );[/br]REM ***************************insert data into the COUNTRIES table[br]Prompt ****** Populating COUNTIRES table ....[/br]INSERT INTO countries VALUES [br] ( 'US'[/br] , 'United States of America'[br] , 2 [br] );[/br]INSERT INTO countries VALUES [/br] ( 'CA'[br] , 'Canada'[/br] , 2 [br] );[/br]INSERT INTO countries VALUES [br] ( 'UK'[/br] , 'United Kingdom'[br] , 1 [br] );[/br]INSERT INTO countries VALUES [/br] ( 'DE'[br] , 'Germany'[/br] , 1 [br] );[/br]REM ***************************insert data into the LOCATIONS table[br]Prompt ****** Populating LOCATIONS table ....[/br]INSERT INTO locations VALUES [br] ( 1400 [/br] , '2014 Jabberwocky Rd'[br] , '26192'[/br] , 'Southlake'[br] , 'Texas'[/br] , 'US'[br] );[/br]INSERT INTO locations VALUES [br] ( 1500 [/br] , '2011 Interiors Blvd'[br] , '99236'[/br] , 'South San Francisco'[br] , 'California'[/br] , 'US'[br] );[/br]INSERT INTO locations VALUES [br] ( 1700 [/br] , '2004 Charade Rd'[br] , '98199'[/br] , 'Seattle'[br] , 'Washington'[/br] , 'US'[br] );[/br]INSERT INTO locations VALUES [br] ( 1800 [/br] , '147 Spadina Ave'[br] , 'M5V 2L7'[/br] , 'Toronto'[br] , 'Ontario'[/br] , 'CA'[br] );[/br]INSERT INTO locations VALUES [br] ( 2500 [/br] , 'Magdalen Centre, The Oxford Science Park'[br] , 'OX9 9ZB'[/br] , 'Oxford'[br] , 'Oxford'[/br] , 'UK'[br] );[/br]REM ****************************insert data into the DEPARTMENTS table[br]Prompt ****** Populating DEPARTMENTS table ....[/br]REM disable integrity constraint to EMPLOYEES to load data[br]ALTER TABLE departments [/br] DISABLE CONSTRAINT dept_mgr_fk;[br]INSERT INTO departments VALUES [/br] ( 10[br] , 'Administration'[/br] , 200[br] , 1700[br] );[/br]INSERT INTO departments VALUES [/br] ( 20[br] , 'Marketing'[/br] , 201[br] , 1800[/br] ); [br]INSERT INTO departments VALUES [/br] ( 50[br] , 'Shipping'[/br] , 121[br] , 1500[/br] ); [br]INSERT INTO departments VALUES [/br] ( 60 [br] , 'IT'[/br] , 103[br] , 1400[/br] ); [br]INSERT INTO departments VALUES [/br] ( 80 [br] , 'Sales'[/br] , 145[br] , 2500[/br] ); [br]INSERT INTO departments VALUES [/br] ( 90 [br] , 'Executive'[/br] , 100[br] , 1700[/br] ); [br]INSERT INTO departments VALUES [/br] ( 110 [br] , 'Accounting'[/br] , 205[br] , 1700[br] );[/br]INSERT INTO departments VALUES [/br] ( 190 [br] , 'Contracting'[/br] , NULL[br] , 1700[br] );[/br]REM ***************************insert data into the JOBS table[/br]Prompt ****** Populating JOBS table ....[br]INSERT INTO jobs VALUES [/br] ( 'AD_PRES'[br] , 'President'[/br] , 20000[br] , 40000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'AD_VP'[br] , 'Administration Vice President'[/br] , 15000[br] , 30000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'AD_ASST'[br] , 'Administration Assistant'[/br] , 3000[br] , 6000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'AC_MGR'[br] , 'Accounting Manager'[/br] , 8200[br] , 16000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'AC_ACCOUNT'[br] , 'Public Accountant'[/br] , 4200[br] , 9000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'SA_MAN'[br] , 'Sales Manager'[/br] , 10000[br] , 20000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'SA_REP'[br] , 'Sales Representative'[br] , 6000[/br] , 12000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'ST_MAN'[br] , 'Stock Manager'[/br] , 5500[br] , 8500[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'ST_CLERK'[br] , 'Stock Clerk'[/br] , 2000[br] , 5000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'SH_CLERK'[br] , 'Shipping Clerk'[br] , 2500[/br] , 5500[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'IT_PROG'[br] , 'Programmer'[/br] , 4000[br] , 10000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'MK_MAN'[br] , 'Marketing Manager'[br] , 9000[/br] , 15000[br] );[/br]INSERT INTO jobs VALUES [/br] ( 'MK_REP'[br] , 'Marketing Representative'[/br] , 4000[br] , 9000[br] );[/br]REM ***************************insert data into the EMPLOYEES table[/br]Prompt ****** Populating EMPLOYEES table ....[br]INSERT INTO employees VALUES [/br] ( 100[br] , 'Steven'[/br] , 'King'[br] , 'SKING'[/br] , '515.123.4567'[br] , TO_DATE('17-JUN-1987', 'dd-MON-yyyy')[/br] , 'AD_PRES'[br] , 24000[/br] , NULL[br] , NULL[/br] , 90[br] );[/br]INSERT INTO employees VALUES [br] ( 101[/br] , 'Neena'[br] , 'Kochhar'[/br] , 'NKOCHHAR'[br] , '515.123.4568'[/br] , TO_DATE('21-SEP-1989', 'dd-MON-yyyy')[br] , 'AD_VP'[/br] , 17000[br] , NULL[/br] , 100[br] , 90[br] );[/br]INSERT INTO employees VALUES [/br] ( 102[br] , 'Lex'[/br] , 'De Haan'[br] , 'LDEHAAN'[/br] , '515.123.4569'[br] , TO_DATE('13-JAN-1993', 'dd-MON-yyyy')[br] , 'AD_VP'[/br] , 17000[br] , NULL[/br] , 100[/br] , 90[br] );[/br]INSERT INTO employees VALUES [br] ( 103[/br] , 'Alexander'[br] , 'Hunold'[/br] , 'AHUNOLD'[br] , '590.423.4567'[/br] , TO_DATE('03-JAN-1990', 'dd-MON-yyyy')[br] , 'IT_PROG'[br] , 9000[/br] , NULL[/br] , 102[br] , 60[br] );[/br]INSERT INTO employees VALUES [/br] ( 104[br] , 'Bruce'[/br] , 'Ernst'[br] , 'BERNST'[/br] , '590.423.4568'[br] , TO_DATE('21-MAY-1991', 'dd-MON-yyyy')[/br] , 'IT_PROG'[br] , 6000[/br] , NULL[br] , 103[/br] , 60[br] );[/br]INSERT INTO employees VALUES [br] ( 107[/br] , 'Diana'[br] , 'Lorentz'[/br] , 'DLORENTZ'[br] , '590.423.5567'[/br] , TO_DATE('07-FEB-1999', 'dd-MON-yyyy')[br] , 'IT_PROG'[/br] , 4200[br] , NULL[/br] , 103[br] , 60[br] );[/br]INSERT INTO employees VALUES [/br] ( 124[br] , 'Kevin'[/br] , 'Mourgos'[br] , 'KMOURGOS'[/br] , '650.123.5234'[br] , TO_DATE('16-NOV-1999', 'dd-MON-yyyy')[/br] , 'ST_MAN'[br] , 5800[br] , NULL[/br] , 100[/br] , 50[br] );[/br]INSERT INTO employees VALUES [br] ( 141[/br] , 'Trenna'[br] , 'Rajs'[/br] , 'TRAJS'[br] , '650.121.8009'[/br] , TO_DATE('17-OCT-1995', 'dd-MON-yyyy')[br] , 'ST_CLERK'[/br] , 3500[br] , NULL[/br] , 124[br] , 50[br] );[/br]INSERT INTO employees VALUES [/br] ( 142[br] , 'Curtis'[/br] , 'Davies'[br] , 'CDAVIES'[/br] , '650.121.2994'[br] , TO_DATE('29-JAN-1997', 'dd-MON-yyyy')[br] , 'ST_CLERK'[/br] , 3100[br] , NULL[/br] , 124[/br] , 50[br] );[/br]INSERT INTO employees VALUES [br] ( 143[/br] , 'Randall'[br] , 'Matos'[/br] , 'RMATOS'[br] , '650.121.2874'[/br] , TO_DATE('15-MAR-1998', 'dd-MON-yyyy')[br] , 'ST_CLERK'[/br] , 2600[br] , NULL[/br] , 124[br] , 50[br] );[/br]INSERT INTO employees VALUES [/br] ( 144[br] , 'Peter'[/br] , 'Vargas'[br] , 'PVARGAS'[/br] , '650.121.2004'[br] , TO_DATE('09-JUL-1998', 'dd-MON-yyyy')[/br] , 'ST_CLERK'[br] , 2500[/br] , NULL[br] , 124[/br] , 50[br] );[/br]INSERT INTO employees VALUES [br] ( 149[/br] , 'Eleni'[br] , 'Zlotkey'[/br] , 'EZLOTKEY'[br] , '011.44.1344.429018'[/br] , TO_DATE('29-JAN-2000', 'dd-MON-yyyy')[br] , 'SA_MAN'[/br] , 10500[br] , .2[br] , 100[/br] , 80[br] );[/br]INSERT INTO employees VALUES [/br] ( 174[br] , 'Ellen'[/br] , 'Abel'[br] , 'EABEL'[/br] , '011.44.1644.429267'[br] , TO_DATE('11-MAY-1996', 'dd-MON-yyyy')[/br] , 'SA_REP'[br] , 11000[/br] , .30[br] , 149[/br] , 80[br] );[/br]INSERT INTO employees VALUES [br] ( 176[/br] , 'Jonathon'[br] , 'Taylor'[/br] , 'JTAYLOR'[br] , '011.44.1644.429265'[/br] , TO_DATE('24-MAR-1998', 'dd-MON-yyyy')[br] , 'SA_REP'[/br] , 8600[br] , .20[br] , 149[/br] , 80[br] );[/br]INSERT INTO employees VALUES [/br] ( 178[br] , 'Kimberely'[/br] , 'Grant'[br] , 'KGRANT'[/br] , '011.44.1644.429263'[br] , TO_DATE('24-MAY-1999', 'dd-MON-yyyy')[br] , 'SA_REP'[/br] , 7000[/br] , .15[br] , 149[/br] , NULL[br] );[/br]INSERT INTO employees VALUES [br] ( 200[/br] , 'Jennifer'[br] , 'Whalen'[/br] , 'JWHALEN'[br] , '515.123.4444'[/br] , TO_DATE('17-SEP-1987', 'dd-MON-yyyy')[br] , 'AD_ASST'[/br] , 4400[br] , NULL[/br] , 101[br] , 10[br] );[/br]INSERT INTO employees VALUES [/br] ( 201[br] , 'Michael'[/br] , 'Hartstein'[br] , 'MHARTSTE'[/br] , '515.123.5555'[br] , TO_DATE('17-FEB-1996', 'dd-MON-yyyy')[/br] , 'MK_MAN'[br] , 13000[br] , NULL[/br] , 100[/br] , 20[br] );[/br]INSERT INTO employees VALUES [br] ( 202[/br] , 'Pat'[br] , 'Fay'[/br] , 'PFAY'[br] , '603.123.6666'[/br] , TO_DATE('17-AUG-1997', 'dd-MON-yyyy')[br] , 'MK_REP'[br] , 6000[/br] , NULL[/br] , 201[br] , 20[br] );[/br]INSERT INTO employees VALUES [/br] ( 205[br] , 'Shelley'[/br] , 'Higgins'[br] , 'SHIGGINS'[/br] , '515.123.8080'[br] , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')[/br] , 'AC_MGR'[br] , 12000[/br] , NULL[br] , 101[/br] , 110[br] );[/br]INSERT INTO employees VALUES [br] ( 206[/br] , 'William'[br] , 'Gietz'[/br] , 'WGIETZ'[br] , '515.123.8181'[br] , TO_DATE('07-JUN-1994', 'dd-MON-yyyy')[/br] , 'AC_ACCOUNT'[/br] , 8300[br] , NULL[/br] , 205[br] , 110[br] );[/br]COMMIT;[/br]REM ********* insert data into the JOB_HISTORY table[br]Prompt ****** Populating JOB_HISTORY table ....[/br]INSERT INTO job_history[br]VALUES (102[/br] , TO_DATE('13-JAN-1993', 'dd-MON-yyyy')[br] , TO_DATE('24-JUL-1998', 'dd-MON-yyyy')[/br] , 'IT_PROG'[br] , 60);[/br]INSERT INTO job_history[br]VALUES (101[/br] , TO_DATE('21-SEP-1989', 'dd-MON-yyyy')[br] , TO_DATE('27-OCT-1993', 'dd-MON-yyyy')[/br] , 'AC_ACCOUNT'[br] , 110);[/br]INSERT INTO job_history[br]VALUES (101[/br] , TO_DATE('28-OCT-1993', 'dd-MON-yyyy')[br] , TO_DATE('15-MAR-1997', 'dd-MON-yyyy')[/br] , 'AC_MGR'[br] , 110);[/br]INSERT INTO job_history[br]VALUES (201[/br] , TO_DATE('17-FEB-1996', 'dd-MON-yyyy')[br] , TO_DATE('19-DEC-1999', 'dd-MON-yyyy')[/br] , 'MK_REP'[br] , 20);[/br]INSERT INTO job_history[br]VALUES (200[/br] , TO_DATE('17-SEP-1987', 'dd-MON-yyyy')[br] , TO_DATE('17-JUN-1993', 'dd-MON-yyyy')[br] , 'AD_ASST'[/br] , 90[br] );[/br]INSERT INTO job_history[/br]VALUES (176[br] , TO_DATE('24-MAR-1998', 'dd-MON-yyyy')[/br] , TO_DATE('31-DEC-1998', 'dd-MON-yyyy')[br] , 'SA_REP'[/br] , 80[br] );[/br]INSERT INTO job_history[br]VALUES (176[/br] , TO_DATE('01-JAN-1999', 'dd-MON-yyyy')[br] , TO_DATE('31-DEC-1999', 'dd-MON-yyyy')[br] , 'SA_MAN'[/br] , 80[br] );[/br]INSERT INTO job_history[br]VALUES (200[/br] , TO_DATE('01-JUL-1994', 'dd-MON-yyyy')[/br] , TO_DATE('31-DEC-1998', 'dd-MON-yyyy')[br] , 'AC_ACCOUNT'[/br] , 90[br] );[/br]prompt***********Populating JOB_GRADES table****************[br]INSERT INTO JOB_GRADES VALUES[/br]('A',1000,2999);[br]INSERT INTO JOB_GRADES VALUES[/br]('B',3000,5999);[br]INSERT INTO JOB_GRADES VALUES[/br]('C',6000,9999);[br]INSERT INTO JOB_GRADES VALUES[/br]('D',10000,14999);[br]INSERT INTO JOB_GRADES VALUES[/br]('E',15000,24999);[br]INSERT INTO JOB_GRADES VALUES[/br]('F',25000,40000);[br]COMMIT;[/br]/ Is it for a too early version or there just permission restrictions in place?Advice is appreciated and thankyou in advance. Share this post Link to post Share on other sites