Everything in the code works fine but I can't figure out how to insert the total amount into the record. The top code ask for the quantity amount and once the user inputs the quantity, it multiplies the unit price for its respective product to display the total Amount. However, in the bottom code, I'm trying to insert the Total Amount into the new record but couldn't figure out how to and failed after many different variations. The question marks shows where it should be.
accept vqty prompt 'Enter the quantity ordered: '; select 'Amount Ordered: ', to_char ('&vqty'*unitprice,'$9,999.99') from products where ProductID='&vProductID';
(Deleted all other code in between for easier review)
insert into orders (Ordernumber,orderdate,CustomerID,ProductID,qty,totalamount,WarehouseID,status,shipdate,qtyshipped) select maxnum,sysdate,'&vCustomerID','&vProductID','&vqty',**???**,'&vWarehouseID','Open',null,null from counter;