home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 October A
/
Pcwk10a98.iso
/
Inprise
/
TRIAL
/
INTRBASE
/
DATA.Z
/
INSERTS.SQL
< prev
next >
Wrap
Text File
|
1998-03-15
|
20KB
|
455 lines
/*
THIS FILE IS FOR USE WITH THE TUTORIAL IN "GETTING STARTED",
IT IS NOT MEANT TO BE USED WITHOUT REFERRING TO THE MANUAL.
* You must change the parameters below to match your
* server name, database name , username, and password.
*/
CONNECT "server:\dir\mydb.gdb"
USER "USERNAME" PASSWORD "password";
/****************************************************************************
*
* Add data to database. INSERTS into COUNTRY, DEPARTMENT,
* JOB, and EMPLOYEE tables.
*
****************************************************************************
*/
/*
* Add countries.
*/
INSERT INTO country (country, currency) VALUES ('USA', 'Dollar');
INSERT INTO country (country, currency) VALUES ('England', 'Pound');
INSERT INTO country (country, currency) VALUES ('Canada', 'CdnDlr');
INSERT INTO country (country, currency) VALUES ('Switzerland', 'SFranc');
INSERT INTO country (country, currency) VALUES ('Japan', 'Yen');
INSERT INTO country (country, currency) VALUES ('Italy', 'Lira');
INSERT INTO country (country, currency) VALUES ('France', 'FFranc');
INSERT INTO country (country, currency) VALUES ('Germany', 'D-Mark');
INSERT INTO country (country, currency) VALUES ('Australia', 'ADollar');
INSERT INTO country (country, currency) VALUES ('Hong Kong', 'HKDollar');
INSERT INTO country (country, currency) VALUES ('Netherlands', 'Guilder');
INSERT INTO country (country, currency) VALUES ('Belgium', 'BFranc');
INSERT INTO country (country, currency) VALUES ('Austria', 'Schilling');
INSERT INTO country (country, currency) VALUES ('Fiji', 'FDollar');
/*
* Add departments.
* Don't assign managers yet.
*
* Departments have parent departments.
* Corporate Headquarters is the top department in the company.
* Singapore field office is new and has 0 employees.
*
*/
commit;
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('000', 'Corporate Headquarters', null, 1000000, 'Monterey','(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('100', 'Sales and Marketing', '000', 2000000, 'San Francisco',
'(415) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('600', 'Engineering', '000', 1100000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('900', 'Finance', '000', 400000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('180', 'Marketing', '100', 1500000, 'San Francisco', '(415) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('620', 'Software Products Div.', '600', 1200000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('621', 'Software Development', '620', 400000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('622', 'Quality Assurance', '620', 300000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('623', 'Customer Support', '620', 650000, 'Monterey', '(408) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('670', 'Consumer Electronics Div.', '600', 1150000, 'Burlington, VT',
'(802) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('671', 'Research and Development', '670', 460000, 'Burlington, VT',
'(802) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('672', 'Customer Services', '670', 850000, 'Burlington, VT', '(802) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('130', 'Field Office: East Coast', '100', 500000, 'Boston', '(617) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('140', 'Field Office: Canada', '100', 500000, 'Toronto', '(416) 677-1000');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('110', 'Pacific Rim Headquarters', '100', 600000, 'Kuaui', '(808) 555-1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('115', 'Field Office: Japan', '110', 500000, 'Tokyo', '3 5350 0901');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('116', 'Field Office: Singapore', '110', 300000, 'Singapore', '3 55 1234');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('120', 'European Headquarters', '100', 700000, 'London', '71 235-4400');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('121', 'Field Office: Switzerland','120', 500000, 'Zurich', '1 211 7767');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('123', 'Field Office: France', '120', 400000, 'Cannes', '58 68 11 12');
INSERT INTO department
(dept_no, department, head_dept, budget, location, phone_no) VALUES
('125', 'Field Office: Italy', '120', 400000, 'Milan', '2 430 39 39');
commit;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('CEO', 1, 'USA', 'Chief Executive Officer', 130000, 250000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('CFO', 1, 'USA', 'Chief Financial Officer', 85000, 140000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('VP', 2, 'USA', 'Vice President', 80000, 130000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Dir', 2, 'USA', 'Director', 75000, 120000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Mngr', 3, 'USA', 'Manager', 60000, 100000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Mngr', 4, 'USA', 'Manager', 30000, 60000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Admin', 4, 'USA', 'Administrative Assistant', 35000, 55000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Admin', 5, 'USA', 'Administrative Assistant', 20000, 40000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Admin', 5, 'England', 'Administrative Assistant', 13400, 26800) /* pounds */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('PRel', 4, 'USA', 'Public Relations Rep.', 25000, 65000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Mktg', 3, 'USA', 'Marketing Analyst', 40000, 80000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Mktg', 4, 'USA', 'Marketing Analyst', 20000, 50000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Accnt', 4, 'USA', 'Accountant', 28000, 55000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Finan', 3, 'USA', 'Financial Analyst', 35000, 85000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 2, 'USA', 'Engineer', 70000, 110000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 3, 'USA', 'Engineer', 50000, 90000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 3, 'Japan', 'Engineer', 5400000, 9720000) /* yen */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 4, 'USA', 'Engineer', 30000, 65000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 4, 'England', 'Engineer', 20100, 43550) /* pounds */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Eng', 5, 'USA', 'Engineer', 25000, 35000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Doc', 3, 'USA', 'Technical Writer', 38000, 60000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Doc', 5, 'USA', 'Technical Writer', 22000, 40000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Sales', 3, 'USA', 'Sales Co-ordinator', 40000, 70000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('Sales', 3, 'England', 'Sales Co-ordinator', 26800, 46900) /* pounds */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'USA', 'Sales Representative', 20000, 100000);
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'England', 'Sales Representative', 13400, 67000) /* pounds */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'Canada', 'Sales Representative', 26400, 132000) /* CndDollar */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'Switzerland', 'Sales Representative', 28000, 149000) /* SFranc */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'Japan', 'Sales Representative', 2160000, 10800000) /* yen */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'Italy', 'Sales Representative', 33600000, 168000000) /* lira */;
INSERT INTO job
(job_code, job_grade, job_country, job_title, min_salary, max_salary) VALUES
('SRep', 4, 'France', 'Sales Representative', 118200, 591000) /* FFranc */;
commit;
/*
* Add employees.
*
* The salaries initialized here are not final. Employee salaries are
* updated below -- see salary_history.
*/
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(2, 'Robert', 'Nelson', '600', 'VP', 2, 'USA', '12/28/88', 98000, '250');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(4, 'Bruce', 'Young', '621', 'Eng', 2, 'USA', '12/28/88', 90000, '233');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(5, 'Kim', 'Lambert', '130', 'Eng', 2, 'USA', '02/06/89', 95000, '22');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(8, 'Leslie', 'Johnson', '180', 'Mktg', 3, 'USA', '04/05/89', 62000, '410');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(9, 'Phil', 'Forest', '622', 'Mngr', 3, 'USA', '04/17/89', 72000, '229');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(11, 'K. J.', 'Weston', '130', 'SRep', 4, 'USA', '01/17/90', 70000, '34');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(12, 'Terri', 'Lee', '000', 'Admin', 4, 'USA', '05/01/90', 48000, '256');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(14, 'Stewart', 'Hall', '900', 'Finan', 3, 'USA', '06/04/90', 62000, '227');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(15, 'Katherine', 'Young', '623', 'Mngr', 3, 'USA', '06/14/90', 60000, '231');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(20, 'Chris', 'Papadopoulos', '671', 'Mngr', 3, 'USA', '01/01/90', 80000,
'887');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(24, 'Pete', 'Fisher', '671', 'Eng', 3, 'USA', '09/12/90', 73000, '888');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(28, 'Ann', 'Bennet', '120', 'Admin', 5, 'England', '02/01/91', 20000, '5');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(29, 'Roger', 'De Souza', '623', 'Eng', 3, 'USA', '02/18/91', 62000, '288');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(34, 'Janet', 'Baldwin', '110', 'Sales', 3, 'USA', '03/21/91', 55000, '2');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(36, 'Roger', 'Reeves', '120', 'Sales', 3, 'England', '04/25/91', 30000, '6');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(37, 'Willie', 'Stansbury','120', 'Eng', 4, 'England', '04/25/91', 35000, '7');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(44, 'Leslie', 'Phong', '623', 'Eng', 4, 'USA', '06/03/91', 50000, '216');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(45, 'Ashok', 'Ramanathan', '621', 'Eng', 3, 'USA', '08/01/91', 72000, '209');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(46, 'Walter', 'Steadman', '900', 'CFO', 1, 'USA', '08/09/91', 120000, '210');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(52, 'Carol', 'Nordstrom', '180', 'PRel', 4, 'USA', '10/02/91', 41000, '420');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(61, 'Luke', 'Leung', '110', 'SRep', 4, 'USA', '02/18/92', 60000, '3');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(65, 'Sue Anne','O''Brien', '670', 'Admin', 5, 'USA', '03/23/92', 30000, '877');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(71, 'Jennifer M.', 'Burbank', '622', 'Eng', 3, 'USA', '04/15/92', 51000,
'289');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(72, 'Claudia', 'Sutherland', '140', 'SRep', 4, 'Canada', '04/20/92', 88000,
null);
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(83, 'Dana', 'Bishop', '621', 'Eng', 3, 'USA', '06/01/92', 60000, '290');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(85, 'Mary S.', 'MacDonald', '100', 'VP', 2, 'USA', '06/01/92', 115000, '477');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(94, 'Randy', 'Williams', '672', 'Mngr', 4, 'USA', '08/08/92', 54000, '892');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(105, 'Oliver H.', 'Bender', '000', 'CEO', 1, 'USA', '10/08/92', 220000, '255');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(107, 'Kevin', 'Cook', '670', 'Dir', 2, 'USA', '02/01/93', 115000, '894');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(109, 'Kelly', 'Brown', '600', 'Admin', 5, 'USA', '02/04/93', 27000, '202');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(110, 'Yuki', 'Ichida', '115', 'Eng', 3, 'Japan', '02/04/93',
6000000, '22');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(113, 'Mary', 'Page', '671', 'Eng', 4, 'USA', '04/12/93', 48000, '845');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(114, 'Bill', 'Parker', '623', 'Eng', 5, 'USA', '06/01/93', 35000, '247');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(118, 'Takashi', 'Yamamoto', '115', 'SRep', 4, 'Japan', '07/01/93',
6800000, '23');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(121, 'Roberto', 'Ferrari', '125', 'SRep', 4, 'Italy', '07/12/93',
90000000, '1');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(127, 'Michael', 'Yanowski', '100', 'SRep', 4, 'USA', '08/09/93', 40000, '492');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(134, 'Jacques', 'Glon', '123', 'SRep', 4, 'France', '08/23/93', 355000, null);
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(136, 'Scott', 'Johnson', '623', 'Doc', 3, 'USA', '09/13/93', 60000, '265');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(138, 'T.J.', 'Green', '621', 'Eng', 4, 'USA', '11/01/93', 36000, '218');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(141, 'Pierre', 'Osborne', '121', 'SRep', 4, 'Switzerland', '01/03/94',
110000, null);
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(144, 'John', 'Montgomery', '672', 'Eng', 5, 'USA', '03/30/94', 35000, '820');
INSERT INTO employee (emp_no, first_name, last_name, dept_no, job_code,
job_grade, job_country, hire_date, salary, phone_ext) VALUES
(145, 'Mark', 'Guckenheimer', '622', 'Eng', 5, 'USA', '05/02/94', 32000, '221');
commit;
exit;