Murach’s SQL for SQL Server – Exercise 7 – Guaranteed 100% score

Lab Price = $9
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

1. Write SELECT INTO statements to create two test tables named VendorCopy and
InvoiceCopy that are complete copies of the Vendors and Invoices tables. If
VendorCopy and InvoiceCopy already exist, first code two DROP TABLE
statements to delete them.

2. Write an INSERT statement that adds a row to the InvoiceCopy table with the
following values:
VendorID: 32 InvoiceTotal: $434.58 TermsID: 2
InvoiceNumber: AX-014-027 PaymentTotal: $0.00 InvoiceDueDate: 11/8/02
InvoiceDate: 10/21/02 CreditTotal: $0.00 PaymentDate: null

3. Write an INSERT statement that adds a row to the VendorCopy table for each
non-California vendor in the Vendors table. (This will result in duplicate vendors in
the VendorCopy table.)

4. Write an UPDATE statement that modifies the VendorCopy table. Change the
default account number to 403 for each vendor that has a default account number of
400.

5. Write an UPDATE statement that modifies the InvoiceCopy table. Change the
PaymentDate to today’s date and the PaymentTotal to the balance due for each
invoice with a balance due. Set today’s date with a literal date string, or use the
GETDATE() function.

6. Write an UPDATE statement that modifies the InvoiceCopy table. Change TermsID
to 2 for each invoice that’s from a vendor with a DefaultTermsID of 2. Use a
subquery.

7. Solve exercise 6 using a join rather than a subquery.

8. Write a DELETE statement that deletes all vendors in the state of Minnesota from
the VendorCopy table.

9. Write a DELETE statement for the VendorCopy table. Delete the vendors that are
located in states from which no vendor has ever sent an invoice.
Hint: Use a subquery coded with “SELECT DISTINCT VendorState” introduced
with the NOT IN operator.

Relevant Material
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at support@iqrajavaid.com.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at support@iqrajavaid.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at support@iqrajavaid.com.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Payment Details
Lab Price = $9
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

Buy Now

View Cart