Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please Write SELECT INTO statements to create one test table named Vendor-Invoice that contain the results of a natural join between the Vendors and Invoices
- Please Write SELECT INTO statements to create one test table named Vendor-Invoice that contain the results of a natural join between the Vendors and Invoices tables;
- Please Write an INSERT statement that adds a row to the Invoices table with the following values: VendorID: 132 InvoiceTotal: $434.58 TermsID: 2 InvoiceNumber: AX-014-027 PaymentTotal: $0.00 InvoiceDueDate: 05/8/2020 InvoiceDate: 4/21/2020 CreditTotal: $0.00 PaymentDate:2021-10-11
- Please Write an INSERT statement to insert the first 20 rows of the Vendors table (ordered by DefaultAccountNo) to the VendorCopy table;
- Please Write an INSERT statement that adds a row to the InvoiceCopy table for each invoice with a payment date later than 2020-01-01 in the Invoices table;
- Please Write an UPDATE statement that modifies the VendorCopy table. Change the Default TermsID to 10 for all the vendors in California (e.g., VendorState = 'CA');
- Please Write an UPDATE statement that modifies the InvoiceCopy table. Change the invoice's TermsID to be the corresponding vendor's Default TermsID (hint: DefaultTermsID can be found in the Vendors table). Use a subquery.
- Please Solve exercise 6 using a join rather than a subquery.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
1 SELECT INTO VendorInvoice FROM Vendors NATURAL JOIN Invoices 2 INSE...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started