You are on page 1of 7

Name: Nang Lam LE ID: 6632785 Course ID: HIT2422

TEST DATA FOR ASSIGNMENT


1. Testing call ASS1_TEST_MSG procedure set serveroutput on; begin dbms_output.put_line(ass1_test_msg('Nang')); end; anonymous block completed Hello Nang. Have a nice day 2. ASS1_RESET_TABLES set serveroutput on; begin ass1_reset_tables(); end; select * from employee; select * from paydetails; 3.ASS1_ GET_EMPID Correct employee number: set serveroutput on; begin dbms_output.put_line(ass1_get_empid(2)); end; anonymous block completed 94 Incorrect employee number: set serveroutput on; begin dbms_output.put_line(ass1_get_empid(15)); end; anonymous block completed -1

4. ASS1_ADD_EMP Correct added: set serveroutput on; begin ass1_add_emp(16,'Lam','Nang','M',10.0); end; Incorrect way: Duplicated ID: set serveroutput on; begin ass1_add_emp(2,'Lam','Nang','M',10.0); end; Error report: ORA-20001: Duplicate employee number ORA-06512: at "S6632785.ASS1_ADD_EMP", line 24 ORA-06512: at line 2 Name length is less than 2 and greater than 30: set serveroutput on; begin ass1_add_emp(20,'Le','Nang','M',10.0); end; set serveroutput on; begin ass1_add_emp(20,'Lam','Nanghajdkwialsksmsngjsndngndngnng','M',10.0); end; Error report: ORA-20002: Invalid Name ORA-06512: at "S6632785.ASS1_ADD_EMP", line 34 ORA-06512: at line 2 Invalid Gender: (Not in range (M, F,I,T)) set serveroutput on; begin ass1_add_emp(20,'Lucky','Luke','K',12.0); end; Error report: ORA-20003: Invalid Gender ORA-06512: at "S6632785.ASS1_ADD_EMP", line 36 ORA-06512: at line 2 Invalid Pay rate: set serveroutput on; begin ass1_add_emp(20,'Lucky','Luke','K',1000); end;

Error report: ORA-20004: Invalid Pay Rate ORA-06512: at "S6632785.ASS1_ADD_EMP", line 38 ORA-06512: at line 2 5.ASS1_GET_ONE_EMP Correct: set serveroutput on; begin dbms_output.put_line(ass1_get_one_emp(2)); end; Name: Jay Pritchett, Gender: M, Pay rate: 12.5 Incorrect: set serveroutput on; begin dbms_output.put_line(ass1_get_one_emp(20)); end; Error report: ORA-20005: Employee not found ORA-06512: at "S6632785.ASS1_GET_ONE_EMP", line 23 ORA-06512: at line 2 6.ASS1_UPDATE_PAY_RATE Correct: set serveroutput on; begin ass1_update_pay_rate(2,14); end; check: set serveroutput on; begin dbms_output.put_line(ass1_get_one_emp(2)); end; Name: Jay Pritchett, Gender: M, Pay rate: 14 Incorrect: set serveroutput on; begin ass1_update_pay_rate(20,14); end; Error report: ORA-20005: Employee not found ORA-06512: at "S6632785.ASS1_UPDATE_PAY_RATE", line 15 ORA-06512: at line 2

7.ASS1_ADD_PAY Correct: set serveroutput on; begin ass1_add_pay(2,1,12); end; check: select * from paydetails; Incorrect: Invalid Employee number: set serveroutput on; begin ass1_add_pay(20,1,12); end; Error report: ORA-20005: Employee not found ORA-06512: at "S6632785.ASS1_ADD_PAY", line 22 ORA-06512: at line 2 Duplicated EmpNumber and WeekNo: set serveroutput on; begin ass1_add_pay(2,1,12); end; Error report: ORA-20007: Weekly PayDetail already exists ORA-06512: at "S6632785.ASS1_ADD_PAY", line 32 ORA-06512: at line 2 Invalid HourWorked (0 to 60): set serveroutput on; begin ass1_add_pay(2,2,61); end; Error report: ORA-20008: Invalid Hours Worked ORA-06512: at "S6632785.ASS1_ADD_PAY", line 34 ORA-06512: at line 2 8.ASS1_DELETE_PAY_DETAILS: set serveroutput on; begin dbms_output.put_line(ass1_delete_pay_details(2)); end; anonymous block completed 1

Incorrect: set serveroutput on; begin dbms_output.put_line(ass1_delete_pay_details(12)); end; Error report: ORA-20005: Employee not found ORA-06512: at "S6632785.ASS1_DELETE_PAY_DETAILS", line 16 ORA-06512: at line 2 9.ASS1_DELETE_EMP Correct: set serveroutput on; begin ass1_delete_emp(2); end; Incorrect: set serveroutput on; begin ass1_delete_emp(12); end; Error report: ORA-20005: Employee Not Found ORA-06512: at "S6632785.ASS1_DELETE_EMP", line 20 ORA-06512: at line 2 set serveroutput on; begin ass1_delete_emp(16); end; Error report: ORA-20006: Cannot Delete Employee With Pay Details ORA-06512: at "S6632785.ASS1_DELETE_EMP", line 22 ORA-06512: at line 2 10.ASS1_GET_ALL_EMPS_AS_STRING: set serveroutput on; begin dbms_output.put_line(ass1_get_all_emps_as_string); end; anonymous block completed Name: Gloria Delgado, Gender: F, Pay rate: 9.75; Name: Haley Dunphy, Gender: F, Pay rate: 14; Name: Cameron Tucker, Gender: M, Pay rate: 11.5; Name: Nang Lam, Gender: M, Pay rate: 10;

11.ASS1_GET_ALL_PAYS_AS_STRING: set serveroutput on; begin dbms_output.put_line(ass1_get_all_pays_as_string); end; anonymous block completed EmpNumber: 16, Week: 1, Hours: 14, Pay rate: 10, Total: 140; 12.Testing ASS1_GET_ALL_EMPS_AS_PACKAGE with VB:

13.Testing ASS1_GET_ALL_PAYS_AS_PACKAGE with VB

You might also like