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 other Homework Specialists are ready to help you
Customer: replied 3 years ago.

Thank you for your help.

You are very welcome.

JustAnswer in the News:

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... seen a spike since October in legal questions from readers about layoffs, unemployment and severance.
Web sites like
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

What Customers are Saying:

  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
< Previous | Next >
  • Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
  • This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
  • Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
  • I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
  • Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
  • Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland
  • He answered my question promptly and gave me accurate, detailed information. If all of your experts are half as good, you have a great thing going here. Diane Dallas, TX

Meet The Experts:

  • LogicPro



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
< Last | Next >
  • LogicPro's Avatar



    Satisfied Customers:

    Expert in Java C++ C C# VB Javascript Design SQL HTML
  • Manal Elkhoshkhany's Avatar

    Manal Elkhoshkhany


    Satisfied Customers:

    More than 5000 online tutoring sessions.
  • Linda_us's Avatar


    Finance, Accounts & Homework Tutor

    Satisfied Customers:

    Post Graduate Diploma in Management (MBA)
  • Chris M.'s Avatar

    Chris M.

    M.S.W. Social Work

    Satisfied Customers:

    Master's Degree, strong math and writing skills, experience in one-on-one tutoring (college English)
  • F. Naz's Avatar

    F. Naz

    Chartered Accountant

    Satisfied Customers:

    Experience with chartered accountancy
  • Bizhelp's Avatar



    Satisfied Customers:

    Bachelors Degree and CPA with Accounting work experience
  • Seanna's Avatar



    Satisfied Customers:

    3,000+ satisfied customers, all topics, A+ work