Here you can search through the pages of this Namespace, their attachments and the files uploaded to the system.
Note: the results will only display the items you have permissions to read.
wikibot
Schema Person Description Contains objects related to names and addresses of customers, vendors, and employees Source
CREATE SCHEMA Person AUTHORIZATION dbo
Dependencies Reference Type Object Type Referencing Object Schema Table Person.Address Schema [...]
wikibot
Table Person.Contact Description Names of each employee, customer contact, and vendor contact. Columns Column Data Type Nullable Default Description ContactID int not null Primary key for Contact records. NameStyle dbo.NameStyle not null ((0)) 0 = The data in FirstName and LastName are stored in western style (first name, last name) order. 1 = Eastern style (last name, first name) order. Title nvarchar(8) null A courtesy title. For example, Mr. or Ms. FirstName dbo.Name not null First name of the person. [...]
[...] [Sales].[Store] s
INNER JOIN [Sales].[StoreContact] sc
ON sc.[CustomerID] = s.[CustomerID]
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = sc.[ContactID]
INNER JOIN [Person].[ContactType] ct
ON sc.[ContactTypeID] = ct.[ContactTypeID]
INNER JOIN [Sales].[CustomerAddress] ca
ON ca.[CustomerID] = s.[CustomerID]
INNER JOIN [Person].[Address] a
ON a.[AddressID] = ca.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
[...]
[...] ,[CountryRegionName] = cr.[Name]
,i.[Demographics]
FROM [Sales].[Individual] i
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = i.[ContactID]
INNER JOIN [Sales].[CustomerAddress] ca
ON ca.[CustomerID] = i.[CustomerID]
INNER JOIN [Person].[Address] a
ON a.[AddressID] = ca.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
INNER JOIN [Person].[CountryRegion] cr
ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
[...]
wikibot adventureworks (mie60) Tables
Address (Person)
AddressType (Person)
AWBuildVersion (dbo)
BillOfMaterials (Production)
Contact (Person)
ContactCreditCard (Sales)
ContactType (Person)
CountryRegion (Person)
CountryRegionCurrency (Sales)
CreditCard (Sales)
Culture (Production)
Currency (Sales)
CurrencyRate (Sales)
Customer (Sales)
CustomerAddress (Sales)
DatabaseLog (dbo) [...]
[...] v
INNER JOIN [Purchasing].[VendorContact] vc
ON vc.[VendorID] = v.[VendorID]
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = vc.[ContactID]
INNER JOIN [Person].[ContactType] ct
ON vc.[ContactTypeID] = ct.[ContactTypeID]
INNER JOIN [Purchasing].[VendorAddress] va
ON va.[VendorID] = v.[VendorID]
INNER JOIN [Person].[Address] a
ON a.[AddressID] = va.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
[...]
wikibot
View Person.vStateProvinceCountryRegion Description Joins StateProvince table with CountryRegion table. Source
CREATE VIEW [Person].[vStateProvinceCountryRegion]
WITH SCHEMABINDING
AS
SELECT
sp.[StateProvinceID]
,sp.[StateProvinceCode]
,sp.[IsOnlyStateProvinceFlag]
,sp.[Name] AS [StateProvinceName]
,sp.[TerritoryID]
,cr.[CountryRegionCode]
,cr.[Name] AS [CountryRegionName]
FROM [Person].[StateProvince] sp
INNER JOIN [Person].[CountryRegion] [...]
[...] SELECT
@ContactID = ContactID,
@FirstName = FirstName,
@LastName = LastName
FROM [Person].[Contact]
WHERE [ContactID] = @ContactID;
SET @JobTitle =
CASE
-- Check for employee
WHEN EXISTS(SELECT * FROM [HumanResources].[Employee] e
WHERE e.[ContactID] = @ContactID)
THEN (SELECT [Title]
FROM [HumanResources].[Employee]
WHERE [ContactID] = @ContactID)
-- Check for vendor
WHEN EXISTS(SELECT * FROM [Purchasing].[VendorContact] vc
INNER JOIN [Person].[ContactType] [...]
wikibot
View Person.vAdditionalContactInfo Description Displays the contact name and content from each element in the xml column AdditionalContactInfo for that person. Source
CREATE VIEW [Person].[vAdditionalContactInfo]
AS
SELECT
[ContactID]
,[FirstName]
,[MiddleName]
,[LastName]
,[ContactInfo].ref.value(N'declare namespace ci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo";
declare namespace act="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes"; [...]
[...] [CountryRegionName]
,c.[AdditionalContactInfo]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeAddress] ea
ON e.[EmployeeID] = ea.[EmployeeID]
INNER JOIN [Person].[Address] a
ON ea.[AddressID] = a.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
INNER JOIN [Person].[CountryRegion] cr
ON cr.[CountryRegionCode] [...]
[...] LEFT OUTER JOIN [Sales].[SalesTerritory] st
ON st.[TerritoryID] = s.[TerritoryID]
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeAddress] ea
ON e.[EmployeeID] = ea.[EmployeeID]
INNER JOIN [Person].[Address] a
ON ea.[AddressID] = a.[AddressID]
INNER JOIN [Person].[StateProvince] sp
ON sp.[StateProvinceID] = a.[StateProvinceID]
INNER JOIN [Person].[CountryRegion] cr
ON cr.[CountryRegionCode] [...]
wikibot
Table Person.CountryRegion Description Lookup table containing the ISO standard codes for countries and regions. Columns Column Data Type Nullable Default Description CountryRegionCode nvarchar(3) not null ISO standard code for countries and regions. Name dbo.Name not null Country or region name. ModifiedDate datetime not null (getdate()) Date and time the record was last updated. Primary Key Primary Key Columns PK_CountryRegion_CountryRegionCode CountryRegionCode Indexes Index Type Columns AK_CountryRegion_Name Unique [...]
wikibot
Table Person.StateProvince Description State and province lookup table. Columns Column Data Type Nullable Default Description StateProvinceID int not null Primary key for StateProvince records. StateProvinceCode nchar(3) not null ISO standard state or province code. CountryRegionCode nvarchar(3) not null ISO standard country or region code. Foreign key to CountryRegion.CountryRegionCode. IsOnlyStateProvinceFlag dbo.Flag not null ((1)) 0 = StateProvinceCode exists. 1 = StateProvinceCode unavailable, using CountryRegionCode. Name dbo.Name [...]
wikibot
XML Schema Collection Person.AdditionalContactInfoSchemaCollection Description Collection of XML schemas for the AdditionalContactInfo column in the Person.Contact table. Source
References Dependency Type Object Type Referenced Object Schema Schema Person [...]
[...] Data Type Table HumanResources.Department Data Type Table HumanResources.Shift Data Type Table Person.AddressType Data Type Table Person.Contact [...]
wikibot
Table Person.ContactType Description Lookup table containing the types of contacts stored in Contact. Columns Column Data Type Nullable Default Description ContactTypeID int not null Primary key for ContactType records. Name dbo.Name not null Contact type description. ModifiedDate datetime not null (getdate()) Date and time the record was last updated. Primary Key Primary Key Columns PK_ContactType_ContactTypeID ContactTypeID Indexes Index Type Columns AK_ContactType_Name Unique Name Detail Tables Detail Table Column [...]
[...] Rejected; 5 = Shipped; 6 = Cancelled OnlineOrderFlag dbo.Flag not null ((1)) 0 = Order placed by sales person. 1 = Order placed online by customer. SalesOrderNumber Unique sales order identification number. PurchaseOrderNumber dbo.OrderNumber null Customer purchase order number reference. AccountNumber dbo.AccountNumber null Financial accounting number reference. CustomerID int not null Customer identification number. Foreign key to Customer.CustomerID. ContactID int not null Customer contact identification number. Foreign key to Contact.ContactID. [...]
wikibot
Table Person.AddressType Description Types of addresses stored in the Address table. Columns Column Data Type Nullable Default Description AddressTypeID int not null Primary key for AddressType records. Name dbo.Name not null Address type description. For example, Billing, Home, or Shipping. rowguid uniqueidentifier not null (newid()) ROWGUIDCOL number uniquely identifying the record. Used to support a merge replication sample. ModifiedDate datetime not null (getdate()) Date and time the record was last updated. Primary Key Primary [...]
wikibot
Table Person.Address Description Street address information for customers, employees, and vendors. Columns Column Data Type Nullable Default Description AddressID int not null Primary key for Address records. AddressLine1 nvarchar(60) not null First street address line. AddressLine2 nvarchar(60) null Second street address line. City nvarchar(30) not null Name of the city. StateProvinceID int not null Unique identification number for the state or province. Foreign key to StateProvince table. PostalCode nvarchar(15) not null [...]
[...] e.[Title], 0 -- Get the initial Employee
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON e.[ContactID] = c.[ContactID]
WHERE e.[EmployeeID] = @EmployeeID
UNION ALL
SELECT e.[EmployeeID], e.[ManagerID], c.[FirstName], c.[LastName], e.[Title], [RecursionLevel] + 1 -- Join recursive member to anchor
FROM [HumanResources].[Employee] e
INNER JOIN [EMP_cte]
ON e.[EmployeeID] = [EMP_cte].[ManagerID]
INNER JOIN [Person].[Contact] c
ON e.[ContactID] = c.[ContactID]
[...]
[...] initial list of Employees for Manager n
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON e.[ContactID] = c.[ContactID]
WHERE [ManagerID] = @ManagerID
UNION ALL
SELECT e.[EmployeeID], e.[ManagerID], c.[FirstName], c.[LastName], [RecursionLevel] + 1 -- Join recursive member to anchor
FROM [HumanResources].[Employee] e
INNER JOIN [EMP_cte]
ON e.[ManagerID] = [EMP_cte].[EmployeeID]
INNER JOIN [Person].[Contact] c
ON e.[ContactID] = c.[ContactID]
[...]
[...] JOIN [HumanResources].[Employee] e
ON soh.[SalesPersonID] = e.[EmployeeID]
INNER JOIN [Person].[Contact] c
ON e.[ContactID] = c.ContactID
) AS soh
PIVOT
(
SUM([SubTotal])
FOR [FiscalYear]
IN ([2002], [2003], [2004])
) AS pvt;
References Dependency Type Object Type Referenced Object Select Table HumanResources.Employee Select Table Person.Contact [...]
[...] IX_StoreContact_ContactTypeID ContactTypeID Foreign Keys Relation Column Referenced Column Person.Contact ContactID ContactID Person.ContactType [...]
[...] AK_CustomerAddress_rowguid Unique rowguid Foreign Keys Relation Column Referenced Column Person.Address AddressID AddressID Person.AddressType [...]
[...] IX_VendorContact_ContactTypeID ContactTypeID Foreign Keys Relation Column Referenced Column Person.Contact ContactID ContactID Person.ContactType [...]
[...] Columns IX_VendorAddress_AddressID AddressID Foreign Keys Relation Column Referenced Column Person.Address AddressID AddressID Person.AddressType [...]
[...] ,d.[GroupName]
,edh.[StartDate]
,edh.[EndDate]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh
ON e.[EmployeeID] = edh.[EmployeeID]
INNER JOIN [HumanResources].[Department] d
ON edh.[DepartmentID] = d.[DepartmentID]
INNER JOIN [HumanResources].[Shift] s
ON s.[ShiftID] = edh.[ShiftID];
References Dependency Type Object Type Referenced Object Select Table HumanResources.Department Select Table HumanResources.Employee [...]
[...] [Department]
,d.[GroupName]
,edh.[StartDate]
FROM [HumanResources].[Employee] e
INNER JOIN [Person].[Contact] c
ON c.[ContactID] = e.[ContactID]
INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh
ON e.[EmployeeID] = edh.[EmployeeID]
INNER JOIN [HumanResources].[Department] d
ON edh.[DepartmentID] = d.[DepartmentID]
WHERE GETDATE() BETWEEN edh.[StartDate] AND ISNULL(edh.[EndDate], GETDATE());
References Dependency Type Object Type Referenced Object Select Table HumanResources.Department Select Table HumanResources.Employee [...]
[...] Sales.SalesPerson TerritoryID TerritoryID Sales.SalesTerritoryHistory TerritoryID TerritoryID Person.StateProvince TerritoryID TerritoryID References [...]
[...] Customer.CustomerID. Name dbo.Name not null Name of the store. SalesPersonID int null ID of the sales person assigned to the customer. Foreign key to SalesPerson.SalesPersonID. [...]