Question: For SQL Sever Development Using the SQL Server Management Studio and the AP database, complete the following tasks. (1) Write a script that declares and

For SQL Sever Development

Using the SQL Server Management Studio and the AP database, complete the following tasks.

(1)

Write a script that declares and sets a variable thats equal to the total outstanding balance due. If the balance due is greater than $10,000, then the script should return a results set consisting of VendorName, InvoiceNumber, InvoiceDueDate, and Balance for each invoice with a balance due, sorted with the highest balance due, first. If the total outstanding balance due is less than $10,000, return the message Balance due is less than $10,000 and include the actual balance in the message. If the Balance due is over $10,000, then return the message Balance due is less than $10,000 and include the actual balance in the messages. For example,

The Balance due is over $10,0000.00, $32,020.42

(2)

Now change the test amount from $10,000 to $100,000 and report the results; note the change in the else output being $100,000 instead of $10,000. What is the output? Print the changed code and the new output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!