Dataset: StoreContacts
Property | Value |
Data source name | AdventureWorks |
Referenced data set | |
Command type | Query |
Name |
@StoreID |
Name | Source column | Data type | Caption | Value | Is calculated field |
BusinessEntityID | BusinessEntityID | System.Int32 | |||
Store | Store | System.String | |||
Title | Title | System.String | |||
FirstName | FirstName | System.String | |||
LastName | LastName | System.String | |||
PhoneNumber | PhoneNumber | System.String |
SELECT s.BusinessEntityID, s.Name AS Store, ct.Name AS Title, p.FirstName, p.LastName, ph.PhoneNumber FROM Sales.Store AS s INNER JOIN Person.BusinessEntityContact AS bec ON bec.BusinessEntityID = s.BusinessEntityID INNER JOIN Person.ContactType AS ct ON ct.ContactTypeID = bec.ContactTypeID INNER JOIN Person.Person AS p ON p.BusinessEntityID = bec.PersonID INNER JOIN Person.PersonPhone AS ph ON p.BusinessEntityID = ph.BusinessEntityID WHERE (s.BusinessEntityID = @StoreID) |