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
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


Inner Join We have learned how to retrieve data from one table by using SELECT statement. But, as we have learned, normalized relational databases mean the data is spread betw

Table Literals - SQL One might expect SQL to support table literals in the manner illustrated in Example 2.2, but in fact that is not a legal SQL expression. Example: Not a

%NOTFOUND The %NOTFOUND is logical, opposite of the %FOUND. The %NOTFOUND yields FALSE if the last fetch returned a row, or TRUE when the final fetch failed to return a row. I

DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the

Question: Consider the following relations (primary keys are underlined): AUTHOR (ANo, aname, address, speciality) PUBLISHER (PNo, pname, Location) BOOK (BNo, Title, ISBN,

Parameter and Keyword Description: cursor_variable_name: This identifies a cursor variable or the parameter formerly declared within the present scope. host_cursor_va

Declaring Objects: You can use the object types wherever built-in types like CHAR or NUMBER can be used. In the block below, you can declare object r of type Rational. Then, yo

Understanding Nested Tables Within the database, the nested tables can be considered as one-column database tables. The Oracle stores the rows of a nested table in no specific o