Home » Developer & Programmer » Forms » Tables for FORMS practice
icon14.gif  Tables for FORMS practice [message #138786] Fri, 23 September 2005 11:52 Go to next message
venu500ag
Messages: 11
Registered: February 2005
Location: INDIA
Junior Member
Hello Friends.
I found many people asking for tables used in FORMS for theie practice sessions.
So these are those tables with data.
(I am also attaching the script file as attachment)
Bye and always be HAPPY...............




drop table s_customer;
drop table s_dept;
drop table s_emp;
drop table s_image;
drop table s_inventory;
drop table s_item;
drop table s_ord;
drop table s_product;
drop table s_region;
drop table s_title;
drop table salgrade;

CREATE TABLE s_customer
(id NUMBER(7) NOT NULL ,
name VARCHAR2(50) NOT NULL,
phone VARCHAR2(25),
address VARCHAR2(400),
city VARCHAR2(30),
state VARCHAR2(20),
country VARCHAR2(30),
zip_code VARCHAR2(75),
credit_rating VARCHAR2(9),
sales_rep_id NUMBER(7),
region_id NUMBER(7),
comments VARCHAR2(255));

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (201, 'UNISPORTS', '55-02066101', '72 Via Bahia', 'Sao Paolo',NULL, 'Brazil', NULL , 'Excellent', 12, 2, 'Customer usually orders large amounts and has a high order total');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (202, 'Sims Atheletics', '81-20101', '6741 Takashi Blvd.', 'Osaka',NULL, 'Japan', NULL , 'Poor', 14, 4, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (203, 'Delhi Sports', '91-10351', '11368 Chanakya', 'New Dehli',NULL, 'India', NULL , 'Good', 14, 4, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (204, 'WomanSport', '1-206-104-0103', '281 King Street.', 'Seatle',NULL, 'USA', NULL , 'Excellent', 11, 1, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (205, 'Kams Sporting Good', '852-3692888', '15 Henessey Road', 'Hong kong', NULL,NULL, NULL, 'Excellent', 15, 4, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (206, 'Sportique', '33-2257201', '172 Rue de Rivoli', 'Cannes',NULL, 'France', NULL , 'Excellent', 15, 5, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (207, 'Sweet Rock Sports', '234-6036201', '6 Saint Antoine', 'Lagos',NULL, 'Nigeria', NULL , 'Good', Null, 3, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (208, 'Muench Sports', '49-527454', '435 Gruenestrasse', 'Stuttgart',NULL, 'Germany', NULL , 'Good', 15, 5, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (209, 'Belsbol Sil', '809-352689', '792 Playa Del Mar', 'San Pedro',NULL, 'Dominican Repbulic', NULL , 'Excellent', 11, 1, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (210, 'Futbol Sonora', '52-404562', '3 Via Saquaro', 'Nogales',NULL, 'Mexico', NULL , 'Excellent', 12, 2, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (211, 'Kuhn Sports', '42-111292', '7 Modrany', 'Prague',NULL, 'Czechoslvakia', NULL , 'Excellent', 15, 5, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (212, 'Hamada Sport', '20-1209211', '57A Corniche', 'Alexandria',NULL, 'Egypt', NULL , 'Excellent', 13, 3, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (213, 'Big Johns Sports Emporium',NULL, '4783 18th Street', 'San Fransicso',NULL, 'USA', NULL , 'Poor', 11, 1, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (214, 'Ojiway Retail', '1-716-555-7171', '415 Main Street', 'Buffalo','14202', 'USA', NULL , 'Poor', 11, 1, 'Customer should always pay by cash until his credit rating improves');

INSERT INTO s_customer (id, name,phone,address,city,state,country,zip_code,credit_rating,sales_rep_id,region_id,comments)
VALUES (215, 'Sports Russia', '7-3892456', '6000 Yekatamina', 'Saint Petersburg',NULL, 'Russia', NULL , 'Poor', 15, 5, 'Customer should always pay by cash until his credit rating improves');


CREATE TABLE s_dept
(id NUMBER(7) NOT NULL,
name VARCHAR2(25) NOT NULL,
region_id NUMBER(7));
INSERT INTO s_dept ( id , name , region_id) VALUES ( 10, 'Finance' , 3);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 31, 'Sales' , 1);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 32, 'Sales' , 2);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 33, 'Sales' , 3);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 34, 'Sales' , 4);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 35, 'Sales' , 5);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 41, 'Operations' , 1);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 42, 'Operations' , 2);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 43, 'Operations' , 3);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 44, 'Operations' , 4);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 45, 'Operations' , 5);
INSERT INTO s_dept ( id , name , region_id) VALUES ( 50,'Aministration',1);


CREATE TABLE s_emp
(id NUMBER(7) NOT NULL,
last_name VARCHAR2(25) NOT NULL,
first_name VARCHAR2(25),
userid VARCHAR2(Cool NOT NULL ,
start_date DATE,
comments VARCHAR2(255),
manager_id NUMBER(7),
title VARCHAR2(25),
dept_id NUMBER(7),
salary NUMBER(11,2),
comission_pct NUMBER(4,2));
INSERT INTO s_emp (id , last_name , first_name , userid, start_date, manager_id, title, dept_id, salary , comission_pct)
VALUES (1, 'Velasquez' , 'Carmen', 'cvelasqu', '03-MAR-90',NULL, 'President' , 50, 2500 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid,start_date, manager_id, title, dept_id, salary , comission_pct)
VALUES (2, 'Ngao' , 'Ladoris', 'Ingao', '08-MAR-90', 1,'VP,OPERATIONS' , 41, 1450 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (3, 'Nagayama' , 'Midori', 'mngayam', '17-JUN-91', 1,'VP,SALES', 31, 1400 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (4, 'Quick-to-See' , 'Mark', 'aropebur', '07-APR-90', 1,'VP,FINANCE' , 10, 1450 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (5, 'Ropebuen' , 'Audry', 'murguhar', '04-MAR-90', 1,'VP,ADMINISTRATION' , 50, 1550 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (6, 'Urguhart' , 'Molly', 'cvelasqu', '18-JAN-91', 2,'WAREHOUSE MANAGER' , 41, 1200 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (7, 'Menchu' , 'Roberta', 'cvelasqu', '14-MAY-90', 2,'WAREHOUSE MANAGER' , 42, 1250 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (8, 'Birl' , 'Ben', 'cvelasqu', '07-APR-90', 2,'WAREHOUSE MANAGER' , 43, 1100 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (9, 'Catchpole' , 'Antoinette', 'cvelasqu', '09-FEB-92', 2,'WAREHOUSE MANAGER' , 44, 1300 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (10, 'Havel' , 'Marta', 'cvelasqu', '27-FEB-91', 2,'WAREHOUSE MANAGER' , 45, 1307 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (11, 'Magee' , 'Colin', 'cvelasqu', '14-MAY-90', 3,'SALES REPRESENTATIVE' , 31, 1400 , 10);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (12, 'Giljum' , 'Henry', 'cvelasqu', '18-JAN-92', 3,'SALES REPRESENTATIVE' , 32, 1490 , 12.5);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (13, 'Sedeghi' , 'Yasmin', 'cvelasqu', '18-FEB-91', 3,'SALES REPRESENTATIVE' , 33, 1515 , 10);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (14, 'Nguyen' , 'Mai', 'cvelasqu', '22-JAN-92', 3,'SALES REPRESENTATIVE' , 34, 1525 , 15);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (15, 'Dumas' , 'Andre', 'cvelasqu', '09-OCT-91', 3,'SALES REPRESENTATIVE' , 35, 1450 , 17.5);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (16, 'Maduro' , 'Elena', 'cvelasqu', '07-FEB-92', 6,'Stock Clerk' , 41, 1400 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (17, 'Smith' , 'George', 'cvelasqu', '08-MAR-90', 6,'Stock Clerk' , 41, 940 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (18, 'Nazoki' , 'Akira', 'cvelasqu', '09-FEB-91', 7,'Stock Clerk' , 42, 1200 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (19, 'Patel' , 'Vikram', 'cvelasqu', '06-AUG-91', 7,'Stock Clerk' , 42, 795 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (20, 'Newman' , 'Chad', 'cvelasqu', '21-JUL-91', 8,'Stock Clerk' , 43, 750 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (21, 'Markerlan' , 'Alexander', 'cvelasqu', '26-MAY-91',8, 'Stock Clerk' , 43, 850 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (22, 'Chang' , 'Eddie', 'cvelasqu', '30-NOV-90', 9,'Stock Clerk' , 44, 800 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (23, 'Patel' , 'Radha', 'cvelasqu', '17-OCT-90', 9,'Stock Clerk' , 34, 795 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (24, 'Dancs' , 'Bela', 'cvelasqu', '17-MAR-91', 10,'Stock Clerk' , 45, 860 , NULL);
INSERT INTO s_emp (id , last_name , first_name , userid, start_date,manager_id, title, dept_id, salary , comission_pct)
VALUES (25, 'Schwartz' , 'sschwart', 'cvelasqu', '09-MAY-91', 10,'Stock Clerk' , 45, 1100 , NULL);


-- ***************************************
CREATE TABLE s_image
(id NUMBER(7) NOT NULL,
format VARCHAR2(25) ,
use_filename VARCHAR2(25),
filename VARCHAR2(25));
INSERT INTO s_image ( id , format , use_filename, filename)
VALUES (1001, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename)
VALUES (1002, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename )
VALUES (1003, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename )
VALUES (1011, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename)
VALUES (1012, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename )
VALUES (1013, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename)
VALUES (1291, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename)
VALUES (1296, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename ,filename)
VALUES (1829, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename )
VALUES (1381, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename, filename )
VALUES (1382, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1119 ,'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1223 ,'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1367, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1368, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1369, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1480, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1482, 'JTIFF' , 'Y' , 'Sunboot.tif');
INSERT INTO s_image ( id , format , use_filename,filename )
VALUES (1486, 'JTIFF' , 'Y' , 'Sunboot.tif');
-- ***************************************
CREATE TABLE s_inventory
(product_id NUMBER(7) NOT NULL,
warehouse_id NUMBER(7) NOT NULL,
amount_in_stock NUMBER(9),
reorder_point NUMBER(9),
max_in_stock NUMBER(9),
out_of_stock_explanation VARCHAR2(255),
restock_date DATE);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (1011, 101 , 650, 625, 1100, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10012, 101 , 600, 560, 1000, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10112, 101 , 300, 300, 525,NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10013, 101 , 400, 400, 700, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10113, 101 , 314, 300, 525, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10021, 101 ,500, 425, 740, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10022, 101 , 300, 200, 350, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10022, 101 , 502, 300, 525, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10023, 101 , 400, 300, 525, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (10023, 101 , 500, 300, 525, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20106, 101 , 993, 625, 1000, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20106, 101 , 220, 150, 260, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20106, 101 , 150, 100, 175, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20108, 101 , 700, 700, 1225, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20108, 101 , 166, 150, 260, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20108, 101 , NULL, 200, 350, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20201, 101 , 802, 800, 1400, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20201, 101 , 320, 200, 350, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20201, 101 , 275, 200, 350, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20510, 101 , 1389, 850, 1400, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20510, 101 , 175, 100, 175, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20510, 101 , 69, 40, 100, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20510, 101 , 88, 50, 100, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20510, 101 , 650, 50, 87, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20512, 101 , 650, 850, 1450, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20512, 101 , 650, 100, 175, NULL ,NULL);
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20512, 101 , 650, 20, 50, NULL ,'10-MAY,92');
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20512, 101 , 650, 75, 140, NULL ,'13-APR,91');
INSERT INTO s_inventory (product_id , warehouse_id, amount_in_stock,reorder_point,max_in_stock,out_of_stock_explanation,restock_date)
VALUES (20512, 101 , 650, 50, 87, NULL ,'12-APR-93');
-- ***************************************
CREATE TABLE s_item
(ord_id NUMBER(7) NOT NULL,
item_id NUMBER(7) NOT NULL,
product_id NUMBER(7) NOT NULL,
price NUMBER(11,2),
quantity NUMBER(9),
quantity_shipped NUMBER(9));
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (97,1,20106,9,1000,1000);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (97,2,30321,1500,50,50);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (98,1,40421,85,7,7);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (99,1,20510,9,18,18);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (99,2,20512,8,25,25);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (99,3,50417,80,53,53);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (99,4,50530,45,69,69);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,1,10011,135,500,500);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,2,10013,380,400,400);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,3,10021,14,500,500);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,4,10023,36,400,400);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,5,30326,582,600,600);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,6,30433,20,450,450);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (100,7,41010,8,250,250);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,1,30421,16,15,15);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,2,40422,50,30,30);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,3,41010,8,20,20);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,4,41100,45,35,35);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,5,50169,4.29,40,40);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,6,50417,80,27,27);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (101,7,50530,45,50,50);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (102,1,20108,28,100,100);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (102,2,20201,123,45,45);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (103,1,30433,20,15,15);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (103,2,32779,7,11,11);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (104,1,20510,9,7,7);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (104,2,20512,8,12,12);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (104,3,30321,1669,19,19);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (104,4,30421,16,35,35);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (105,1,50273,22.89,16,16);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (105,2,50419,80,13,13);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (105,3,50532,47,28,28);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,1,20108,28,46,46);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,2,20201,123,21,21);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,3,50169,4.29,125,125);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,4,50273,22.89,75,75);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,5,50418,75,98,98);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (106,6,50419,80,27,27);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (107,1,20106,11,50,50);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (107,2,20108,28,22,22);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (107,3,20201,115,130,130);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (107,4,30321,1669,75,75);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (107,5,30421,16,55,55);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,1,20510,9,9,9);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,2,20512,8,18,18);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,3,30321,1669,85,85);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,4,32779,7,60,60);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,5,32861,60,57,57);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,6,41080,35,50,50);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (108,7,41100,45,42,42);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,1,10011,140,150,150);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,2,10012,175,600,600);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,3,10022,21.95,300,300);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,4,30326,582,1500,1500);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,5,30426,18.25,500,500);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,6,32861,60,50,50);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (109,7,50418,75,43,43);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (110,1,50273,22.89,17,17);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (110,2,50536,50,23,23);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (111,1,40421,65,27,27);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (111,2,41080,35,29,29);
INSERT INTO s_item (ord_id,item_id, product_id, price, quantity,quantity_shipped) VALUES (112,1,20106,11,50,50);
-- ***************************************
CREATE TABLE s_ord
(id NUMBER(7) NOT NULL,
customer_id NUMBER(7) NOT NULL,
date_ordered DATE,
date_shipped DATE,
sales_rep_id NUMBER(9),
total NUMBER(11,2),
payment_type VARCHAR2(6),
order_filled VARCHAR2(1));
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (100, 204, '31-AUG-92', '10-SEP-92', 11, 601100, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (101, 205, '31-AUG-92', '15-SEP-92', 14, 8056.6, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (102, 206, '01-SEP-92', '08-SEP-92', 15, 8335, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (103, 208, '02-SEP-92', '22-SEP-92', 15, 377, 'CASH');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (104, 208, '03-SEP-92', '23-SEP-92', 15, 32430, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (105, 209, '04-SEP-92', '18-SEP-92', 11, 2722.24, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (106, 210, '07-SEP-92', '15-SEP-92', 12,15634, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (107, 211, '07-SEP-92', '21-SEP-92', 15, 142171, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (108, 212, '07-SEP-92', '10-SEP-92', 13, 149570, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (109, 213, '08-SEP-92', '28-SEP-92', 11, 1020935, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (110, 214, '09-SEP-92', '21-SEP-92', 11, 1539.13, 'CASH');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (111, 204, '09-SEP-92', '21-SEP-92', 11, 2770, 'CASH');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (97, 201, '28-AUG-92', '17-SEP-92', 12, 84000, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (98, 202, '31-AUG-92', '10-SEP-92', 14, 595, 'CASH');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (99, 203, '31-AUG-92', '18-SEP-92', 14, 7707, 'CREDIT');
INSERT INTO s_ord ( id , customer_id, date_ordered,date_shipped,sales_rep_id,total, payment_type)
VALUES (112, 210, '31-AUG-92', '10-SEP-92', 12, 550, 'CREDIT');
-- ***************************************
CREATE TABLE s_product
(id NUMBER(7) NOT NULL,
name VARCHAR2(50) NOT NULL,
short_desc VARCHAR2(25),
longtext_id NUMBER(7),
image_id NUMBER(7),
suggested_whilsl_price NUMBER(11,2),
whlsl_units VARCHAR2(25)) ;
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10011, 'Runny Boot', 'Beginner"s ski boot', 518, 1001, 150, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10012, 'Ace Ski Boot', 'Intermediate ski boot', 519, 1002, 200, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10013, 'Pro Ski Boot', 'Advanced ski boot', 520, 1003, 410, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10021, 'Bunny Ski Pole', 'Beginner"s ski pole', 528, 1011, 16.25, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10022, 'Ace Ski Pole', 'Intermediate ski boot', 529, 1012, 21.95, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (10023, 'Pro Ski Pole', 'Advanced ski boot', 530, 1013, 40.95, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (20106, 'Junior Soccer Ball', 'Junior soccer ball', 613, NULL, 11, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (20108, 'World Cup Socccer Ball', 'World Cup Socccer Ball', 615, NULL, 28, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (20201, 'World Cup Net', 'World Cup Net', 708, NULL, 123, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (20510, 'Black Hawk Knee Pads', 'Knee pads, pair', 1017, NULL, 9, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (20512, 'Black Hawk Elbow Pads', 'Elbow pads, pair', 1019, NULL, 8, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (30321, 'Grand Prix Bicyle', 'Road bicycle', 828, 1291, 1669, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (30326, 'Himalaya Bicycle', 'Mountain bicycle', 833, 1296, 582, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (30421, 'Grand Prix Bicycle Tires', 'Road mountain tires', 927, NULL, 16, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (30426, 'Himalaya Tires', 'Mountain bicycle tires', 933, NULL, 18.25, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (30433, 'New Air Pump', 'Tire pump', 940, NULL, 20, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (32779, 'Slaker Water Bottle', 'Water bottle', 1286, NULL, 7, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (32861, 'Safe_T Helmet', 'Bicycle helmet', 1368, 1829, 60, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (40421, 'Alexeyer Pro Lifting Bar', 'Straight bar', 928, 1381, 65, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (40422, 'Pro Curling Bar', 'Curling bar', 929, 1382, 50, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (41010, 'Prostar 10 Pound Weight', 'Ten pound weight', 517, NULL, 8, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (41020, 'Prostar 20 Pound Weight', 'Twenty pound weight', 527, NULL, 12, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (41050, 'Prostar 50 Pound Weight', 'Fifty pound weight', 557, NULL, 25, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (41080, 'Prostar 80 Pound Weight', 'Eighty pound weight', 587, NULL, 35, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50169, 'Major League Baseball', 'Baseball', 676, 1119, 4.29, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50273, 'Chapman Helmet', 'Batting helmet', 780, 1223, 22.89, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50417, 'Griffey Glove', 'Outfielder"s glove', 924, 1367, 80, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50418, 'Alomar Glove', 'Infielder"s glove', 925, 1368, 75, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50419, 'Steinbach Glove', 'Catcher"s glove', 926, 1369, 80, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50530, 'Cabrera Bat', 'Thirty inch bat', 1037, 1048, 45, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50532, 'Puckett Bat', 'Thirty-two inch bat', 1039, 1482, 47, NULL);
INSERT INTO s_product (id , name , short_desc , longtext_id , image_id , suggested_whilsl_price , whlsl_units)
VALUES (50536, 'Winfield Bat', 'Thirty-six inch bat', 1043, 1486, 50, NULL);
-- ***************************************
CREATE TABLE s_region
(id NUMBER(7) NOT NULL,
name VARCHAR2(50) NOT NULL ) ;
INSERT INTO s_region ( id , name ) VALUES ( 1, 'North America');
INSERT INTO s_region ( id , name ) VALUES ( 2, 'South America');
INSERT INTO s_region ( id , name ) VALUES ( 3, 'Africa/Midlle East');
INSERT INTO s_region ( id , name ) VALUES ( 4, 'Asia');
INSERT INTO s_region ( id , name ) VALUES ( 5, 'Europe');
-- ***************************************
CREATE TABLE s_title
(title VARCHAR2(2) NOT NULL);
-- **************************************
create table salgrade
(grade number(1),
losal number(Cool,
hisal number(Cool);

insert into salgrade(grade,losal,hisal) values(1,800,1199);
insert into salgrade(grade,losal,hisal) values(2,1200,1599);
insert into salgrade(grade,losal,hisal) values(3,1600,2499);
insert into salgrade(grade,losal,hisal) values(4,2500,3500);
insert into salgrade(grade,losal,hisal) values(5,3501,10000);
commit;
/
Re: Tables for FORMS practice [message #138928 is a reply to message #138786] Sun, 25 September 2005 21:14 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Keyword: sampledata, sampletable

David

[Updated on: Thu, 13 October 2005 18:50]

Report message to a moderator

Re: Tables for FORMS practice [message #142157 is a reply to message #138786] Thu, 13 October 2005 11:17 Go to previous message
abcindiaxyz
Messages: 13
Registered: March 2005
Location: Indonesia
Junior Member
Thank you for the sample data.
Was looking for the data from a long time.
Cool Cool
Previous Topic: transparent gateway for sql server
Next Topic: How to query SQL in a block?
Goto Forum:
  


Current Time: Fri Sep 20 14:18:12 CDT 2024