home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 October A / Pcwk10a98.iso / Inprise / TRIAL / INTRBASE / DATA.Z / INSERTS2.SQL < prev    next >
Encoding:
Text File  |  1998-03-15  |  17.2 KB  |  393 lines

  1. /*
  2.     THIS FILE IS FOR USE WITH THE TUTORIAL IN "GETTING STARTED",
  3.     IT IS NOT MEANT TO BE USED WITHOUT REFERRING TO THE MANUAL.
  4.  
  5. *   You must change the parameters below to match your
  6. *   server name, database name , username, and password.
  7. *
  8. *   This file inserts data into the PROJECT,
  9. *   EMPLOYEE_PROJECT, PROJ_DEPT_BUDGET, CUSTOMER, 
  10. *   and SALES tables.
  11. */
  12.  
  13. CONNECT "server:\dir\mydb.gdb"
  14. USER "USERNAME" PASSWORD "password";
  15.  
  16. /*
  17.  *  Add projects.
  18.  *  Some projects have no team leader.
  19.  */
  20.  
  21. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  22. ('VBASE', 'Video Database', 45, 'software');
  23.  
  24.         /* proj_desc blob:
  25.                   Design a video data base management system for
  26.                   controlling on-demand video distribution.
  27.         */
  28.  
  29. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  30. ('DGPII', 'DigiPizza', 24, 'other');
  31.  
  32.         /* proj_desc blob:
  33.                   Develop second generation digital pizza maker
  34.                   with flash-bake heating element and
  35.                   digital ingredient measuring system.
  36.         */
  37.  
  38. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  39. ('GUIDE', 'AutoMap', 20, 'hardware');
  40.  
  41.         /* proj_desc blob:
  42.                   Develop a prototype for the automobile version of
  43.                   the hand-held map browsing device.
  44.         */
  45.  
  46. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  47. ('MAPDB', 'MapBrowser port', 4, 'software');
  48.  
  49.         /* proj_desc blob:
  50.                   Port the map browsing database software to run
  51.                   on the automobile model.
  52.         */
  53.  
  54. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  55. ('HWRII', 'Translator upgrade', null, 'software');
  56.  
  57.         /* proj_desc blob:
  58.                   Integrate the hand-writing recognition module into the
  59.                   universal language translator.
  60.         */
  61.  
  62. INSERT INTO project (proj_id, proj_name, team_leader, product) VALUES
  63. ('MKTPR', 'Marketing project 3', 85, 'N/A');
  64.  
  65. /* proj_desc blob:
  66.                   Expand marketing and sales in the Pacific Rim.
  67.                   Set up a field office in Australia and Singapore.
  68. */
  69.  
  70.  
  71. /*
  72.  *  Assign employees to projects.
  73.  *  One project has no employees assigned.
  74.  */
  75.  
  76. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 144);
  77. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 113);
  78. INSERT INTO employee_project (proj_id, emp_no) VALUES ('DGPII', 24);
  79.  
  80. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 8);
  81. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 136);
  82. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 15);
  83. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 71);
  84. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 145);
  85. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 44);
  86. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 4);
  87. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 83);
  88. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 138);
  89. INSERT INTO employee_project (proj_id, emp_no) VALUES ('VBASE', 45);
  90.  
  91. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 20);
  92. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 24);
  93. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 113);
  94. INSERT INTO employee_project (proj_id, emp_no) VALUES ('GUIDE', 8);
  95.  
  96. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MAPDB', 4);
  97. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MAPDB', 71);
  98.  
  99. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 46);
  100. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 105);
  101. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 12);
  102. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 85);
  103. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 110);
  104. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 34);
  105. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 8);
  106. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 14);
  107. INSERT INTO employee_project (proj_id, emp_no) VALUES ('MKTPR', 52);
  108.  
  109.  
  110. /*
  111.  *  Add project budget planning by department.
  112.  *  Head count array is not added here.
  113.  */
  114.  
  115. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  116. (1994, 'GUIDE', '100', 200000);
  117.         /* head count:  1,1,1,0 */
  118. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  119. (1994, 'GUIDE', '671', 450000);
  120.         /* head count:  3,2,1,0 */
  121. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  122. (1993, 'MAPDB', '621', 20000);
  123.         /* head count:  0,0,0,1 */
  124. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  125. (1994, 'MAPDB', '621', 40000);
  126.         /* head count:  2,1,0,0 */
  127. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  128. (1994, 'MAPDB', '622', 60000);
  129.         /* head count:  1,1,0,0 */
  130. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  131. (1994, 'MAPDB', '671', 11000);
  132.         /* head count:  1,1,0,0 */
  133. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  134. (1994, 'HWRII', '670', 20000);
  135.         /* head count:  1,1,1,1 */
  136. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  137. (1994, 'HWRII', '621', 400000);
  138.         /* head count:  2,3,2,1 */
  139. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  140. (1994, 'HWRII', '622', 100000);
  141.         /* head count:  1,1,2,2 */
  142. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  143. (1994, 'MKTPR', '623', 80000);
  144.         /* head count:  1,1,1,2 */
  145. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  146. (1994, 'MKTPR', '672', 100000);
  147.         /* head count:  1,1,1,2 */
  148. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  149. (1994, 'MKTPR', '100', 1000000);
  150.         /* head count:  4,5,6,6 */
  151. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  152. (1994, 'MKTPR', '110', 200000);
  153.         /* head count:  2,2,0,3 */
  154. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  155. (1994, 'MKTPR', '000', 100000);
  156.         /* head count:  1,1,2,2 */
  157. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  158. (1995, 'MKTPR', '623', 1200000);
  159.         /* head count:  7,7,4,4 */
  160. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  161. (1995, 'MKTPR', '672', 800000);
  162.         /* head count:  2,3,3,3 */
  163. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  164. (1995, 'MKTPR', '100', 2000000);
  165.         /* head count:  4,5,6,6 */
  166. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  167. (1995, 'MKTPR', '110', 1200000);
  168.         /* head count:  1,1,1,1 */
  169. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  170. (1994, 'VBASE', '621', 1900000);
  171.         /* head count:  4,5,5,3 */
  172. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  173. (1995, 'VBASE', '621', 900000);
  174.         /* head count:  4,3,2,2 */
  175. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  176. (1994, 'VBASE', '622', 400000);
  177.         /* head count:  2,2,2,1 */
  178. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  179. (1994, 'VBASE', '100', 300000);
  180.         /* head count:  1,1,2,3 */
  181. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  182. (1995, 'VBASE', '100', 1500000);
  183.         /* head count:  3,3,1,1 */
  184. INSERT INTO proj_dept_budget (year, proj_id, dept_no, projected_budget) VALUES
  185. (1996, 'VBASE', '100', 150000);
  186.         /* head count:  1,1,0,0 */
  187.  
  188.  
  189. /*
  190.  *  Add a few customer records.
  191.  */
  192.  
  193. INSERT INTO customer
  194. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  195. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  196. (1001, 'Signature Design', 'Dale J.', 'Little', '(619) 530-2710',
  197. '15500 Pacific Heights Blvd.', null, 'San Diego', 'CA', 'USA', '92121', null);
  198.  
  199. INSERT INTO customer
  200. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  201. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  202. (1002, 'Dallas Technologies', 'Glen', 'Brown', '(214) 960-2233',
  203. 'P. O. Box 47000', null, 'Dallas', 'TX', 'USA', '75205', null);
  204.  
  205. INSERT INTO customer
  206. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  207. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  208. (1003, 'Buttle, Griffith and Co.', 'James', 'Buttle', '(617) 488-1864',
  209. '2300 Newbury Street', 'Suite 101', 'Boston', 'MA', 'USA', '02115', null);
  210.  
  211. INSERT INTO customer
  212. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  213. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  214. (1004, 'Central Bank', 'Elizabeth', 'Brocket', '61 211 99 88',
  215. '66 Lloyd Street', null, 'Manchester', null, 'England', 'M2 3LA', null);
  216.  
  217. INSERT INTO customer
  218. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  219. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  220. (1005, 'DT Systems, LTD.', 'Tai', 'Wu', '(852) 850 43 98',
  221. '400 Connaught Road', null, 'Central Hong Kong', null, 'Hong Kong', null, null);
  222.  
  223. INSERT INTO customer
  224. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  225. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  226. (1006, 'DataServe International', 'Tomas', 'Bright', '(613) 229 3323',
  227. '2000 Carling Avenue', 'Suite 150', 'Ottawa', 'ON', 'Canada', 'K1V 9G1', null);
  228.  
  229. INSERT INTO customer
  230. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  231. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  232. (1007, 'Mrs. Beauvais', null, 'Mrs. Beauvais', null,
  233. 'P.O. Box 22743', null, 'Pebble Beach', 'CA', 'USA', '93953', null);
  234.  
  235. INSERT INTO customer
  236. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  237. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  238. (1008, 'Anini Vacation Rentals', 'Leilani', 'Briggs', '(808) 835-7605',
  239. '3320 Lawai Road', null, 'Lihue', 'HI', 'USA', '96766', null);
  240.  
  241. INSERT INTO customer
  242. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  243. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  244. (1009, 'Max', 'Max', null, '22 01 23',
  245. '1 Emerald Cove', null, 'Turtle Island', null, 'Fiji', null, null);
  246.  
  247. INSERT INTO customer
  248. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  249. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  250. (1010, 'MPM Corporation', 'Miwako', 'Miyamoto', '3 880 77 19',
  251. '2-64-7 Sasazuka', null, 'Tokyo', null, 'Japan', '150', null);
  252.  
  253. INSERT INTO customer
  254. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  255. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  256. (1011, 'Dynamic Intelligence Corp', 'Victor', 'Granges', '01 221 16 50',
  257. 'Florhofgasse 10', null, 'Zurich', null, 'Switzerland', '8005', null);
  258.  
  259. INSERT INTO customer
  260. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  261. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  262. (1012, '3D-Pad Corp.', 'Michelle', 'Roche', '1 43 60 61',
  263. '22 Place de la Concorde', null, 'Paris', null, 'France', '75008', null);
  264.  
  265. INSERT INTO customer
  266. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  267. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  268. (1013, 'Lorenzi Export, Ltd.', 'Andreas', 'Lorenzi', '02 404 6284',
  269. 'Via Eugenia, 15', null, 'Milan', null, 'Italy', '20124', null);
  270.  
  271. INSERT INTO customer
  272. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  273. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  274. (1014, 'Dyno Consulting', 'Greta', 'Hessels', '02 500 5940',
  275. 'Rue Royale 350', null, 'Brussels', null, 'Belgium', '1210', null);
  276.  
  277. INSERT INTO customer
  278. (cust_no, customer, contact_first, contact_last, phone_no, address_line1,
  279. address_line2, city, state_province, country, postal_code, on_hold) VALUES
  280. (1015, 'GeoTech Inc.', 'K.M.', 'Neppelenbroek', '(070) 44 91 18',
  281. 'P.0.Box 702', null, 'Den Haag', null, 'Netherlands', '2514', null);
  282.  
  283.  
  284. /*
  285.  *  Add some sales records.
  286. */
  287.  
  288. INSERT INTO sales
  289. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  290. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  291. ('V91E0210', 1004, 11,  '03/04/91', '03/05/91', null,
  292. 'shipped',      'y',    10,     5000,   0.1,    'hardware');
  293.  
  294. INSERT INTO sales
  295. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  296. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  297. ('V93J3100', 1010, 118, '08/20/93', '08/20/93', null,
  298. 'shipped',      'y',    16,     18000.40,       0.10, 'software');
  299.  
  300. INSERT INTO sales
  301. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  302. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  303. ('V93F3088', 1012, 134, '08/27/93', '09/08/93', null,
  304. 'shipped',      'n',    10,     10000,          0, 'software');
  305.  
  306. INSERT INTO sales
  307. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  308. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  309. ('V93F2030', 1012, 134, '12/12/93', null,    null,
  310. 'open',         'y',    15,     450000.49,      0, 'hardware');
  311.  
  312. INSERT INTO sales
  313. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  314. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  315. ('V93F2051', 1012, 134, '12/18/93', null, '03/01/94',
  316. 'waiting',      'n',    1,      999.98,         0, 'software');
  317.  
  318. INSERT INTO sales
  319. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  320. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  321. ('V93H0030', 1005, 118, '12/12/93', null, '01/01/94',
  322. 'open',         'y',    20,     5980,           0.20, 'software');
  323.  
  324. INSERT INTO sales
  325. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  326. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  327. ('V94H0079', 1005, 61, '02/13/94', null, '04/20/94',
  328. 'open',         'n',    10,     9000,           0.05, 'software');
  329.  
  330. INSERT INTO sales
  331. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  332. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  333. ('V9320630', 1001, 127, '12/12/93', null, '12/15/93',
  334. 'open',         'n',    3,      60000,  0.20, 'hardware');
  335.  
  336. INSERT INTO sales
  337. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  338. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  339. ('V9420099', 1001, 127, '01/17/94', null, '06/01/94',
  340. 'open',         'n',    100, 3399.15,   0.15, 'software');
  341.  
  342.  
  343. INSERT INTO sales
  344. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  345. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  346. ('V93C0990', 1006, 72, '08/09/93', '09/02/93', null,
  347. 'shipped',      'y',    40,     399960.50,      0.10, 'hardware');
  348. INSERT INTO sales
  349. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  350. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  351. ('V9333005', 1002, 11, '02/03/93', '03/03/93', null,
  352. 'shipped',      'y',    2,      600.50,         0, 'software');
  353.  
  354. INSERT INTO sales
  355. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  356. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  357. ('V9346200', 1003, 11, '12/31/93', null, '01/24/94',
  358. 'waiting',      'n',    3,      0,      1,    'software');
  359.  
  360. INSERT INTO sales
  361. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  362. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  363. ('V9456220', 1007, 127, '01/04/94', null, '01/30/94',
  364. 'open',         'y',    1,      3999.99,        0, 'hardware');
  365.  
  366. INSERT INTO sales
  367. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  368. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  369. ('V94S6400', 1011, 141, '01/06/94', null, '02/15/94',
  370. 'waiting',      'y',    20,     1980.72,        0.40, 'software');
  371.  
  372. INSERT INTO sales
  373. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  374. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  375. ('V93H0500', 1008, 61, '12/12/93', null, '12/15/93',
  376. 'open',         'n',    3,      16000,          0.20, 'hardware');
  377.  
  378. INSERT INTO sales
  379. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  380. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  381. ('V93I4700', 1013, 121, '10/27/93', null, '12/15/93',
  382. 'open',         'n',    5,      2693,           0, 'hardware');
  383.  
  384. INSERT INTO sales
  385. (po_number, cust_no, sales_rep, order_date, ship_date, date_needed,
  386. order_status, paid, qty_ordered, total_value, discount, item_type) VALUES
  387. ('V93N5822', 1015, 134, '12/18/93', '01/14/94', null,
  388. 'shipped',      'n',    2,      1500.00,        0, 'software');
  389.  
  390. commit;
  391. exit;
  392.  
  393.