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
DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows

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.

CURRVAL and NEXTVAL The series is a schema object which generates the sequential numbers. Whenever you form a sequence, you can specify its primary value and an increment. T

i NEED THE QURIES TO SOME OF THE PROBLEMS USING plsql

Explicitly specifying the join condition - SQL SELECT * FROM IS_CALLED JOIN IS_ENROLLED_ON ON ( IS_CALLED.StudentId = IS_ENROLLED_ON.StudentId ) Now, the key word JO

LEVEL You use the LEVEL with the SELECT CONNECT BY statement to categorize rows from a database table into a tree structure. The LEVEL returns the level number of a node in a

Example of COALESCE operator Example: Give the total of marks for each exam (simplified solution) SELECT CourseId, COALESCE ((SELECT SUM (Mark) FROM EXAM_MARK AS EM

heap sort program in pl/sql

Avoid the NOT NULL Constraint In the PL/SQL, using the NOT NULL constraint incur a performance cost. Consider the illustration as shown below: PROCEDURE calc_m IS m NUMB

%ROWCOUNT The %ROWCOUNT yields the number of rows affected by the INSERT, UPDATE, or DELETE statement, or returned by a SELECT INTO statement. The %ROWCOUNT yields zero when a