Database Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesDatabase Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 26th, 2008, 07:55 PM
rolmau rolmau is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2008
Posts: 1 rolmau User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 37 sec
Reputation Power: 0
Unhappy How to run my program??

Hi every body I am running late from my first homework using PL/SQL to connect to Oracle DB 10g. PROBLEM To
Write a PL/SQL program that calculates the retail price for an item when the product name is given. The cost is stored in a table PRODUCTS (Prod_no, Name, Cost),
-Assume that the profit margin is 50% and that VAT is inclunded in the retail price.
-The program should show the retail price and the net price (price without VAT).

my answer which a don't know to run my program
v_cost number(6,2),
p_name varchar2(30),
price number(6,2),
vat number(6,2),
tatal number(6,2);
begin
p_name :='Toshiba DVD Player'
select= cost, into v_cost,
from products
where name=p_name;

price:= v_cost*1.5;
vat:= price*0.175;
total:= price + vat;

DBMS_OUTPUT.PUT_LINE(name||':');
DBMS_OUTPUT.PUT_LINE('Cost: £'||v_cost);
DBMS_OUTPUT.PUT_LINE('Price:£'||price);
DBMS_OUTPUT.PUT_LINE('VAT: £'||vat);
DBMS_OUTPUT.PUT_LINE('Total: £'||total);
end;
/

I don't know which table I HAVE TO CREATE to run my program does it TABLE PRODUCTS?? (as mention in the problem)OR TABLE TOSHIBA_DVD_PLAYER (as mention in my program)????????????

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesDatabase Development > How to run my program??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway