| How to find all sales staff involved with touring frames? |
|
Execute the following T-SQL scripts in Microsoft SQL Server Management Studio Query Editor to list sales staff selling touring frames.
-- SQL like operator - wildcard matching - SQL string concatenation
-- SQL inner join USE AdventureWorks; SELECT DISTINCT SalesPerson = c.FirstName + ' ' + c.LastName FROM Person.Contact c JOIN Sales.SalesOrderHeader soh ON soh.SalesPersonId = c.ContactID JOIN Sales.SalesOrderDetail sod ON soh.SalesOrderId = sod.SalesOrderId JOIN Production.Product p ON sod.ProductID = P.ProductID AND p.Name LIKE ('%Touring Frame%') GO /* Partial results SalesPerson Carla Eldridge Carol Elliott Gail Erickson Gary Drury Janeth Esteves
*/
------------ |
|
| |
| |
|