SQL QUERY - please (merged) [message #305169] |
Sun, 09 March 2008 22:52 |
rolmau
Messages: 18 Registered: March 2008 Location: UK
|
Junior Member |
|
|
Hi to everybody
I am using oracle 10g running from windows xp
I getting some error from my programme may someone will help please
here my progmm
I created my table products
create table products(
prod_no varchar2(10),
name varchar2(10),
v_cost number,
cost varchar2(10));
when I run this programm
declare
v_cost number;
p_name varchar2(30);
price number(6,2);
vat number(6,2);
total 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;
/
getting this error
select cost, into v_cost
*
ERROR at line 10:
ORA-06550: line 10, column 2:
PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
* & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
I DO NOT WHAT DOES IT MEAN
|
|
|
|
|
|
|
|
Re: the same sound from my progrmme [message #305649 is a reply to message #305473] |
Tue, 11 March 2008 08:13 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
Posting pieces of code is useless. How do we know what you changed, what you ran or your real error.
Please read the guidelines of the forum and post your full session, not a reasonable facsimile.
And please post formatted code.
|
|
|