Well this is what I have done so far I ran these 2 lines first, they worked:
VARIABLE g_total NUMBER
VARIABLE g_prod NUMBER
Next I ran these 4 lines and they worked:
BEGIN
:g_total := 100;
:g_prod := 4;
END;
Then I ran these and that is when the problems started.
DECLARE
lv_qty_num NUMBER(3) := 0;
lv_amt_num NUMBER(5,2) := 0;
lv_price_num bb_product.price%TYPE;
BEGIN
SELECT price
INTO lv_price_num
FROM bb_product
WHERE idProduct = :g_prod;
WHILE lv_price_num < (:g_total-lv_amt_num) LOOP
lv_price_num := (:g_total-lv_amt_num);
END IF;
I know I have nothing to be seen but I would hope for the code to execute, Please someone could you give me a hint of where I am going wrong? Thank you.