How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask TheDoctor Your Own Question

TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience:  M.S. in Internet Information Systems
Type Your Homework Question Here...
TheDoctor is online now
A new question is answered every 9 seconds

Due Date: April, 09th, 2013, IDE: SQL Developer

This answer was rated:

Due Date: April, 09th, 2013
IDE: SQL Developer


1.Write a script that creates a cursor consisting of vendor_name, invoice_number, and balance_due for each invoice with a balance due that’s greater than or equal to $5,000. The rows in this cursor should be sorted in descending sequence by balance due. Then, for each invoice, display the balance due, invoice number, and vendor name so it looks something like this:


$19,351.18                P-0608               Malloy Lithographing Inc


2. Enhance your solution to exercise 3 so it shows the invoice data in three groups based on the balance due amounts with these headings:


$20,000 or More
$10,000 to $20,000
$5,000 to $10,000

Each group should have a heading followed by the data for the invoices that fall into that group. Also, the groups should be separated by one blank line.


3. 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:


Invoice amounts greater than or equal to $2,000

where 2,000 is the value of the bind variable.


4. Create a trigger named invoices_before_update_payment for the Invoices table that raises an application error whenever the payment total plus the credit total becomes larger than the invoice total in a row. Then, test this trigger with an appropriate UPDATE statement. (Note that you could code a check constraint to accomplish the same task.)


5. Create a trigger named invoices_after_update_payment for the Invoices table that displays the vendor name, invoice number, and payment total in the output window whenever the payment total is increased. Then, test this trigger with an appropriate UPDATE statement. (A trigger like this could be modified so it stores the data in an audit table.)

Here is a Link that contains the details of the columns of all the tables to be able to write queries in SQL Developer.

Hi, I'm a Moderator for this topic. I've been working hard to find a Professional to assist you right away, but sometimes finding the right Professional can take a little longer than expected.

I wonder whether you're ok with continuing to wait for an answer. If you are, please let me know and I will continue my search. If not, feel free to let me know and I will cancel this question for you. Thank you!
Customer: replied 3 years ago.

I will wait for a response from a expert. Would it help if l increased the amount?

Thank you for your continued patience. We will continue the search for a Professional for you.
Thank you for your patience, your business is very important to us, we are waiting on the Professional with the right expertise to come online. Feel free to let us know if you would like us to continue searching for a Professional or if you would like us to close your question. Thank you for your understanding!
Customer: replied 3 years ago.

l am going to wait. thank you

Thank you for your reply. Your question is open to all the professionals and marked high priority. You'll receive an email notification if a professional replies. We appreciate your patience.

Customer: replied 3 years ago.

Thank you l have a extension till April 13th, 2013.

Hello and thank you for using JustAnswer. It would be my pleasure to assist you with this.

I numbers 2 and 3, it states "Enhance your solution to exercise 3".

Is #1 in your list "exercise 3"?

Thank you
Customer: replied 3 years ago.

that is correct. my teacher told us yesterday he made a mistake. Question # XXXXX is exercise 3.

Thank you,

I will contact you once this is complete.
Hello again!

You can download the completed work here:

In the SQL files are all 5 questions, plus the two queries to test questions #4 and #5.

If you are going to run them, make certain you do it one at a time. Some of them will not function if you attempt to run everything at once.

Keep in mind that the test query for #4 is SUPPOSED to throw an error. That's the entire point of it. The error says "Bad Record Amounts". That is a custom error (which was the point of #4).

Let me know if you have any questions. I'm here to help.

Please remember to rate my answer. It is the only way that I receive credit for my time and effort. If you require more assistance, simply continue our conversation before leaving any rating.

Thank you so much for using JustAnswer. Have a great day!

You need to spend $3 to view this post. Add Funds to your account and buy credits.
TheDoctor, Professional w/Adv. Degree
Category: Homework
Satisfied Customers: 1757
Experience: M.S. in Internet Information Systems
TheDoctor and 5 other Homework Specialists are ready to help you
Customer: replied 3 years ago.

Thank you for your help.

You are very welcome.

Related Homework Questions