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