0

Everytime I execute my script it just echos everything in my script and never executes it. It forms numbers on the side for the lines of code then it never lets me get out of it I have to restart all over again to try again. Here is an the code it does it after.

-- 1

CREATE OR REPLACE FUNCTION ZIP_CODE_SALES(zip_in IN VARCHAR)
  RETURN FLOAT
IS
  totalSales FLOAT;
BEGIN
  SELECT SUM(S.gross_sale_price) INTO totalSales
  FROM SALE S JOIN CUSTOMER C
  ON S.cust_ID = C.cust_ID
  GROUP BY C.zip_code 
  HAVING C.zip_code = zip_in;   
  RETURN totalSales;
END;

1 Answer 1

1

You have to add hadd a slash/ after the end; to ensure the DML in the buffer is executed.

END;
/
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.