Question: Write a Script to Declare and use a cursor that does the following: Lists the Vendors, their Invoice Numbers, Account Numbers, and the Sum of

Write a Script to Declare and use a cursor that does the following: Lists the Vendors,  their Invoice Numbers,  Account Numbers, and the Sum of their InvoiceItemLineAmounts for each invoice.  [Vendors, Invoices, InvoiceLineItems]
Put the cursor into local variables use the print statement to return in each row in "Name (Invoice Number) - Account Number: $Sum"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here is an example script in TSQL that declares and uses a cursor to list the vendors their invoi... View full answer

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!