Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 3rd, 2004, 10:18 AM
Registered User
 
Join Date: Dec 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PL/SQL i need help

hi can anyone help to do this task?

Tiny Toys is a company that sells toys to schools and nurseries by mail order. Orders are taken over the phone by a number of sales consultants. The company already have a database with five tables set up. Table names and their columns are shown below:

TOYS (Toy_ID, Description, Rec_Retail_Price)

CUSTOMERS (Customer_ID, Name, Address, City, County, Post_Code, Account, Sales_Consultant_ID)

LINEITEMS (Order_ID, Toy_ID, Price, Quantity, Quantity_Sent)

ORDERS (ID, Customer_ID, Order_Date, Date_Sent, Sales_Consultant_ID, Total, Payment_With_Order, Order_Filled)

SALES_CONSULTANTS (ID, Last_name,First_name)



The above tables and the data can be found in k:\work\computing\Beryl Jones\plsqlcwk.sql. In order to do this assignment, you will need to create these tables in your own schema using the above script.



YOUR TASK


1. Write a procedure (not an anonymous block) to display details of all of the orders for a specific customer along with the customer’s name. The customer’s name should only be displayed once regardless of how many orders they have placed and should be passed into the procedure as a parameter. For each order the following details should be displayed :

• order_id
• order_date
• date_sent
• total
• order_filled


2. Write a procedure (not an anonymous block) to calculate and display the total commission earned by a specific sales consultant on all the orders they take. The commission rate is 5% per order and you must write a function to calculate the actual commission value. The name of the sales consultant must also be displayed.





3. Write a procedure (not an anonymous block) to display details of all the line items for a specific order and include the toy description in the output. The order_id should be passed into the procedure as a parameter. For each line item the following details should be displayed:

• order_id
• toy_id
• description (of the toy)
• price
• quantity
• quantity_sent



  #2 (permalink)  
Old December 3rd, 2004, 10:28 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

It's homework time...



--

Joe (Microsoft MVP - XML)
  #3 (permalink)  
Old January 5th, 2005, 11:38 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 28
Thanks: 0
Thanked 1 Time in 1 Post
Default

Quote:
quote:Originally posted by joefawcett
 It's homework time...

We wouldn't mind so much its the fact you left all of the references to the drives in.

Reminds me of a time I was at College, we had a number of reference books one of which was very useful. You could basically use a chapter to write each assignment, most of us simply used it as a guide and added more info from other soures and changed it enough so it became unrecognisable. But 3 people got a scanner and scanned it in word for word. The thing is I don't think the lecturers would have noticed if it wasn't for the fact it has "see figure 1.1" all over the place where that had left out the picturers.


  #4 (permalink)  
Old January 6th, 2005, 01:14 AM
Registered User
 
Join Date: Dec 2004
Location: Chennai, TN, India.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to maneeshgautam Send a message via MSN to maneeshgautam Send a message via Yahoo to maneeshgautam
Default

Hi,

You said,
"The above tables and the data can be found in k:\work\computing\Beryl Jones\plsqlcwk.sql. In order to do this assignment, you will need to create these tables in your own schema using the above script."

So can you send the plsqlcwk.sql please?

Thanks and regards
-Maneesh

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PL/SQL Somesh ASP.NET 1.0 and 1.1 Basics 7 December 15th, 2006 05:49 PM
PL/SQL Cursor help Wikked Oracle 1 March 12th, 2005 01:19 AM
PL/SQL cooldude87801 Oracle 1 March 3rd, 2005 10:54 AM
PL/SQL help carly_1 Oracle 1 October 19th, 2003 08:14 PM
PL/SQL help Blue Oracle 0 August 12th, 2003 02:54 PM



All times are GMT -4. The time now is 11:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.