0502_H

0502_H - groupcodereview StevenFeuerstein...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 Steven Feuerstein Senior Technology Advisor [email protected] www.quest.com What is wrong with this code? An exploration into code nastiness,  to be corrected through  group code review.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 2 Code and Presention Visit the PL/SQL Pipeline to download a full  best practices training and all associated  files. www.quest-pipelines.com Quest Experts Page Best Practices and Tuning
Background image of page 2
What's wrong with this code? Generally, you can take your pick from. ..
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 4 What's wrong with this code? CREATE OR REPLACE PROCEDURE process_employee ( employee_id_in IN NUMBER) IS l_name VARCHAR2(100); BEGIN SELECT last_name || ',' || first_name INTO l_name FROM employee WHERE employee_id = employee_id_in; ... END; fullname.pkg
Background image of page 4
Page 5 What's wrong with this code? PROCEDURE calc_totals (dept_in IN INTEGER, date_in IN DATE) IS bad_date EXCEPTION; BEGIN IF dept_in IS NULL -- Department cannot be NULL. THEN DBMS_OUTPUT.PUT_LINE ( 'Provide a non-NULL department ID: ' || DBMS_UTILITY.FORMAT_CALL_STACK); RAISE VALUE_ERROR; END IF; -- Date must be within the last five years. IF TRUNC (date_in) NOT BETWEEN TRUNC (ADD_MONTHS (SYSDATE, -60)) AND TRUNC (SYSDATE) THEN DBMS_OUTPUT.PUT_LINE ('Date is out of range : ' || DBMS_UTILITY.FORMAT_CALL_STACK); RAISE bad_date; END IF; ...
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 17

0502_H - groupcodereview StevenFeuerstein...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online