subject

Enhance your solution to exercise 3 so it uses a substitution variable to set a bind variable that you use to determine what the minimum balance due should be for the invoices that the SELECT statement is going to retrieve. You should also use this bind variable to display a heading like this before the list of invoices: You are using the bind variable to set the balance due minimum. In this case 2000 is not a hard coded value but is set using a bind variable. Invoice amounts greater than or equal to $2,000 where 2,000 is the value of the bind variable. SET SERVEROUTPUT ON;
DECLARE
CURSOR invoices_cursor IS
SELECT vendor_name, invoice_number, invoice_total - payment_total - credit_total AS balance_due
FROM ap. vendors v INNER JOIN ap. invoices i
ON v. vendor_id = i. vendor_id
WHERE invoice_total - payment_total - credit_total >= 5000
ORDER BY balance_due DESC;
invoice_row invoices_copy%ROWTYPE;
BEGIN
FOR invoice_row IN invoices_cursor LOOP
DBMS_OUTPUT. PUT_LINE(to_char(invoice_row. balance_due, '$99,999.99') || ' ' || invoice_row. invoice_number || ' ' || invoice_row. vendor_name);
END LOOP;
END;

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 10:30
Would a ps4 wired controller work on an xbox one
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
Write a program that displays the following menu: geometry calculator 1. calculate the area of a circle 2. calculate the area of a rectangle 3. calculate the area of a triangle 4. quit enter your choice (1-4): if the user enters 1, the program should ask for the radius of the circle and then display its area. use the following formula: area = ď€(the square of r) use 3.14159 for ď€ and the radius of the circle for r. if the user enters 2, the program should ask for the length and width of the rectangle and then display the rectangle’s area. use the following formula: area = length * width if the user enters 3, the program should ask for the length of the triangle’s base and its height, and then display its area. use the following formula: area = base * height * .5 if the user enters 4, the program should end. input validation: display an error message if the user enters a number outside the range of 1 through 4 when selecting an item from the menu. do not accept negative values for the circle’s radius, the rectangle’s length or width, or the triangle’s base or height. note: if the user enters an improper menu choice (1-4), the program prints "the valid choices are 1 through 4. run the program again and select one of those." if the user enters a negative radius, the program prints "the radius can not be less than zero." if the user enters a negative value for height or base, the program prints "only enter positive values for base and height."
Answers: 1
question
Computers and Technology, 24.06.2019 12:30
Why does the pc send out a broadcast arp prior to sending the first ping request
Answers: 1
question
Computers and Technology, 25.06.2019 01:00
When a new name is registered on the internet, the process can take two hours to four hours four hours to three days two hours to two days one hour to eight hours
Answers: 1
You know the right answer?
Enhance your solution to exercise 3 so it uses a substitution variable to set a bind variable that y...
Questions
question
Mathematics, 16.12.2020 20:00
question
Mathematics, 16.12.2020 20:00
question
Mathematics, 16.12.2020 20:00
Questions on the website: 13722363