Hi i tried compiling and ended up getting these errors. Is it possible that you can provide a solution to resolve these errors?

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter12: Database Queries With Sql
Section: Chapter Questions
Problem 9RQ
icon
Related questions
Question
100%

Hi i tried compiling and ended up getting these errors. Is it possible that you can provide a solution to resolve these errors?  

 

Input
SET SERVEROUTPUT ON;
DECLARE
total_sum INT := 0;
BEGIN
END;
FOR 1 IN 1..10 LOOP
total_sum total_sum + i;
END LOOP;
Output
C
Error: near "SET": syntax error
:
DBMS_OUTPUT.PUT_LINE(' Sum of first ten natural numbers: || total_sum);
Run SQL
>
Transcribed Image Text:Input SET SERVEROUTPUT ON; DECLARE total_sum INT := 0; BEGIN END; FOR 1 IN 1..10 LOOP total_sum total_sum + i; END LOOP; Output C Error: near "SET": syntax error : DBMS_OUTPUT.PUT_LINE(' Sum of first ten natural numbers: || total_sum); Run SQL >
Input
CREATE OR REPLACE FUNCTION arithmetic_operations (
num1 IN NUMBER,
num2 IN NUMBER,
operation IN VARCHAR2
) RETURN NUMBER
IS
result NUMBER;
BEGIN
CASE operation
Output
WHEN 'ADD' THEN
result = num1 + num2;
WHEN SUBTRACT' THEN
nocult
num1 - num?.
Error: near "OR": syntax error
()
G
Run SQL
Transcribed Image Text:Input CREATE OR REPLACE FUNCTION arithmetic_operations ( num1 IN NUMBER, num2 IN NUMBER, operation IN VARCHAR2 ) RETURN NUMBER IS result NUMBER; BEGIN CASE operation Output WHEN 'ADD' THEN result = num1 + num2; WHEN SUBTRACT' THEN nocult num1 - num?. Error: near "OR": syntax error () G Run SQL
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Concept of Threads
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning