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, 22.06.2019 19:50
Write a car class having two private member variables called tank and speed. write public methods called pumpgas and gofast. the method pumpgas gets an integer for gas that must be pumped. that value needs to be added to tank (no more than 20 gallons). it must return the amount of gas that is purchased ($4 per gallon). the method gofast should increase the speed by 5 each time it is called.write a constructor for the above class that initialized both variables to zero.write a tostring to display both the tank and speed when the car is printed.modify the car class to implement the interface comparable and an interface called carinter having the public methods in carinter.write the main program to create an array of size 5 of type car. create 5 car objects having each location of the array to refer to one of the cars. test the pumpgas, gofast, equals method on the array items. write an enhanced loop to print all the car values (using a tostring written last time).write a generic method to find the minimum of four items. pass int, double, char, string and car objects to test this method.
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
File account.java (see previous exercise) contains a definition for a simple bank account class with methods to withdraw, deposit, get the balance and account number, and return a string representation. note that the constructor for this class creates a random account number. save this class to your directory and study it to see how it works. then write the following additional code: 1. suppose the bank wants to keep track of how many accounts exist. a. declare a private static integer variable numaccounts to hold this value. like all instance and static variables, it will be initialized (to 0, since it’s an int) automatically. b. add code to the constructor to increment this variable every time an account is created. c. add a static method getnumaccounts that returns the total number of accounts. think about why this method should be static - its information is not related to any particular account. d. file testaccounts1.java contains a simple program that creates the specified number of bank accounts then uses the getnumaccounts method to find how many accounts were created. save it to your directory, then use it to test your modified account class.
Answers: 3
question
Computers and Technology, 23.06.2019 22:20
Read “suburban homes construction project” at the end of chapters 8 and 9 (in the textbook) and then develop a wbs (work breakdown structure) in microsoft excel or in microsoft word (using tables)
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, 14.12.2020 22:50
question
Mathematics, 14.12.2020 22:50
question
Mathematics, 14.12.2020 22:50
question
Social Studies, 14.12.2020 22:50
question
Social Studies, 14.12.2020 22:50
question
German, 14.12.2020 22:50
Questions on the website: 13722363