Question: 3. Modify the search expression for InvoiceDueDate from the solution for question 2. Rather than 30 days from today, return invoices due before the last
3. Modify the search expression for InvoiceDueDate from the solution for question 2. Rather than 30 days from today, return invoices due before the last day of the current month.
SQL Code: SELECT InvoiceNumber, (InvoiceTotal - CreditTotal) AS Balance, InvoiceDueDate FROM Invoices WHERE InvoiceDueDate < CONVERT(DATETIME, DATEADD(D, -1, GETDATE()), 120) AND (InvoiceTotal - CreditTotal) <> 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
