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
Effects of NULL in Table Literal When a VALUES expression appears as the source value for an SQL INSERT statement, the key word NULL can appear as a field value, such that for

Advantages of Wrapping   The PL/SQL Wrapper convert the PL/SQL source code into a transitional form of the object code. By hiding the application internals, the Wrapper secure

Transactions in SQL BEGIN TRANSACTION, COMMIT, and ROLLBACK, SQL has the same syntax except for START in place of BEGIN. However, START TRANSACTION is used only for outermost

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

Remote Operations: As the illustration shows below, the PL/SQL subprograms can execute the dynamic SQL statements which refer to the objects on a remote database: PROCEDURE

Using raise_application_error The Package DBMS_STANDARD that is supplied with Oracle gives language facilities that help your application to interact with Oracle. For illustra

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system

Use of Table Comparisons - SQL Table comparisons where it is noted that although table expressions cannot be compared, we have TABLE (t) to convert a table expression t into

Role of Abstraction in pl/sql: The abstraction is a high-level description or model of a real-world entity. The Abstractions keep our daily lives convenient. They help us ca

Using the FORALL Statement The keyword FORALL instruct the PL/SQL engine to bulk-bind input collections before sending them all to the SQL engine. Though the FORALL statement