Home » SQL & PL/SQL » SQL & PL/SQL » help with pl/sql code
help with pl/sql code [message #183785] Sun, 23 July 2006 17:02 Go to next message
Messages: 62
Registered: September 2005
Location: U.K
please I need help with this tables

i have a table called orderline and another one called stock

i have quantity as an attribute in my orderline table and i have price(unit.) in my stock table.

the problem is i want to be able to calculate the amount for multiple items (more than one quatity) and at the same time i want to calculate the total price for all items in the orderline.

I dont want to have both the amount and the total as attribute because they have to be derived.

Please how can i implement this.

orderline table

stock table
selling price


Re: help with pl/sql code [message #183786 is a reply to message #183785] Sun, 23 July 2006 17:23 Go to previous messageGo to next message
Messages: 25571
Registered: January 2009
Location: SoCal
Senior Member
I'd like some clarification.
You are hoping/expecting us to to complete your homework assignment
so you avoid the problem of figuring out how to do it your self.
Why are you bothering to go to class anyways since you don't want to learn how to do this yourself?
Re: help with pl/sql code [message #183911 is a reply to message #183785] Mon, 24 July 2006 06:29 Go to previous message
Messages: 1016
Registered: March 2005
Location: Scotland
Senior Member
Sharaf, it has to be said, this does sound a bit like a homework assignment. We can and will help you, but you have to put in some effort. Show us that you have done at least some work.

1. Supply create table scripts.
2. Supply insert scripts to populate those tables.
3. Provide the code that you have tried.
4. Provide the expected output based on the sample data that you have provided in the insert scripts.
5. Provide any error messages or problems that you have incurred in you failed attempts to write the code.

Previous Topic: Insert is too slow......
Next Topic: data_length in user_tab_columns
Goto Forum:

Current Time: Sat Aug 19 17:34:27 CDT 2017

Total time taken to generate the page: 0.04510 seconds