|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
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
|
|||
|
|||
Hi every body I am running late from my first homework using PL/SQL to connect to Oracle DB 10g. PROBLEM ToWrite 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)???????????? |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Database Development > How to run my program?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|