Posted - 11/14/2012 : 23:48:31
| Hi I am trying to figure out this problem and it has me stumped. That last part
"Where the first letter of the vendor name is N, O or P" Has me confused.
I thought of using SELECT DISTINCT or using a Substring, can I get some insight?
Write a CREATE VIEW statement that defines a view named InvoiceBasic that returns
three columns: VendorName, InvoiceNumber, and InvoiceTotal. Then, write a SELECT
statement that returns all of the columns in the view, sorted by VendorName, where the
first letter of the vendor name is N, O, or P.
CREATE VIEW InvoiceBasic
--RETURN VendorName, InvoiceNumber, InvoiceTotal
SELECT VendorName, InvoiceNumber, InvoiceTotal
WHERE SUBSTRING(N, O, P)
ORDER BY VendorName
A witty student