DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
SITE SEARCH SQLUSA.com HEADLINES NEWS
SQL E/BOOKS  SQL 2012 PROGRAMMING  DOWNLOADS
SCRIPTS SQL 2005 SQL 2008 ARTICLES
SQL JOBS TWITTER FORMAT VIDEOS
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

*/
 

------------

Exam Prep 70-461
Exam 70-461
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE