oracle development , PL-SQL Programming

Write a stored procedure that accepts the post code in which the customer resides as the input parameter. The procedure should then use an explicit cursor to display comprehensive details about each customer, the number of bookings that customer has made and the total cost of all completed rentals for that customer.
Procedure:
1. Use a fully declared explicit cursor to find and display comprehensive details for each customer.
2. Use an implicit cursor and a SQL function to calculate the number of bookings the customer has made. Display the number of bookings.
3. Calculate the total cost. In order to calculate the total cost, you may not use any SQL functions (e.g. SUM) and you must find a way of using local variables to do the arithmetic. Only completed rentals are used in this calculation. When miles_in has a value, the rental is complete. Display the total cost when the computation is complete.
Submit the code and a screen dump of the output when the program is run.
Posted Date: 10/30/2012 5:29:55 AM | Location : United States







Related Discussions:- oracle development , Assignment Help, Ask Question on oracle development , Get Answer, Expert's Help, oracle development Discussions

Write discussion on oracle development
Your posts are moderated
Related Questions
Components of an Object Type: An object type encapsulates the operations and data. Therefore, you can declare the methods and attributes in an object type specification, but no

Benefit of the dynamic SQL: This part shows you how to take full benefit of the dynamic SQL and how to keep away from some of the common pitfalls. Passing the Names of Sc

Predicate - SQL Consider the declarative sentence-a proposition-that is used to introduce this topic:  "Student S1, named Anne, is enrolled on course C1." Recall that th

Using COMMIT The COMMIT statements end the present transaction and make permanent any changes made during that transaction. Till you commit the changes, other users cannot acc

GOTO Statement The GOTO statement branches to a label unconditionally. The label must be exclusive within its scope and should precede an executable statement or a PL/SQL block.

Usefulness of Data Type In SQL, as in most computer languages, a type can be used for constraining the values that are permitted to be used for some purpose. In particular, i

MECHANISTI S THEORY-HAECKEL (1866) - Haeckel stating that after each catalysm, some new organism suddenly forms as a chance event in one stride from inanimate matter and sub

Assignment Source Not a Literal - Variable Syntax: SET SN = SID (SUBSTRING (SN.C FROM 1 FOR 1)||'5');

Using Subqueries A subquery is a query (typically enclosed by parentheses) that appears within another SQL data manipulation statement. If evaluated, the subquery gives a va

Example of Foreign Key Constraint Example: Alternative formulation for 6.3 as a foreign key constraint ALTER TABLE EXAM_MARK ADD CONSTRAINT Must_be_enrolled_to_take_exam