| 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
*/
------------ |
| |
| SQLUSA.com
Home Page |
|
|
SQL Server Training at www.sqlusa.com.
Microsoft SQL Server 2012 Training Videos at www.sqlusa.com.
SQL Server 2008 Video Training at www.sqlusa.com.
SQL Server 2005 Training Videos at www.sqlusa.com.
|
|
|
FREE SS SQL / BI OLAP Short Videos on YOUTUBE.com |
|
Search SQLUSA FREE SQL Server Articles & FREE T-SQL Scripts |
Copyright 2005-2012, SMI Corp. All Rights Reserved.
SQL Server 2012 is a program product of Microsoft Corporation. SQL Server 2008 is a program product of Microsoft Corporation. SQL Server 2005 is a program product of Microsoft Corporation. SQL Server 2000 is a program product of Microsoft Corporation. |