AdventureWorks2014

//
AdventureWorks 2014 Sample OLTP Database

Created: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Objects

Tables (71) Views (20) Stored Procedures (10) Functions: Scalar (10)

Tables

AWBuildVersion DatabaseLog ErrorLog HumanResources.Department HumanResources.Employee HumanResources.EmployeeDepartmentHistory HumanResources.EmployeePayHistory HumanResources.JobCandidate HumanResources.Shift Person.Address Person.AddressType Person.BusinessEntity Person.BusinessEntityAddress Person.BusinessEntityContact Person.ContactType Person.CountryRegion Person.EmailAddress Person.Password Person.Person Person.PersonPhone Person.PhoneNumberType Person.StateProvince Production.BillOfMaterials Production.Culture Production.Document Production.Illustration Production.Location Production.Product Production.ProductCategory Production.ProductCostHistory Production.ProductDescription Production.ProductDocument Production.ProductInventory Production.ProductListPriceHistory Production.ProductModel Production.ProductModelIllustration Production.ProductModelProductDescriptionCulture Production.ProductPhoto Production.ProductProductPhoto Production.ProductReview Production.ProductSubcategory Production.ScrapReason Production.TransactionHistory Production.TransactionHistoryArchive Production.UnitMeasure Production.WorkOrder Production.WorkOrderRouting Purchasing.ProductVendor Purchasing.PurchaseOrderDetail Purchasing.PurchaseOrderHeader Purchasing.ShipMethod Purchasing.Vendor Sales.CountryRegionCurrency Sales.CreditCard Sales.Currency Sales.CurrencyRate Sales.Customer Sales.PersonCreditCard Sales.SalesOrderDetail Sales.SalesOrderHeader Sales.SalesOrderHeaderSalesReason Sales.SalesPerson Sales.SalesPersonQuotaHistory Sales.SalesReason Sales.SalesTaxRate Sales.SalesTerritory Sales.SalesTerritoryHistory Sales.ShoppingCartItem Sales.SpecialOffer Sales.SpecialOfferProduct Sales.Store

AWBuildVersion

//
Current version number of the AdventureWorks 2014 sample database.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:29 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

SystemInformationID
Database Version
VersionDate
ModifiedDate
1
12.0.1800
Wed Feb 19 2014 23:26:00 GMT-0500 (Eastern Standard Time)
Mon Jul 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)

DatabaseLog

//
Audit table tracking all DDL changes made to the AdventureWorks database. Data is captured by the database trigger ddlDatabaseTriggerLog.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:29 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

DatabaseLogID
PostTime
DatabaseUser
Event
Schema
Object
TSQL
XmlEvent
1
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TABLE
dbo
ErrorLog
CREATE TABLE [dbo].[ErrorLog]( [ErrorLogID] [int] IDENTITY (1, 1) NOT NULL, [ErrorTime] [datetime] NOT NULL CONSTRAINT [DF_ErrorLog_ErrorTime] DEFAULT (GETDATE()), [UserName] [sysname] NOT NULL, [ErrorNumber] [int] NOT NULL, [ErrorSeverity] [int] NULL, [ErrorState] [int] NULL, [ErrorProcedure] [nvarchar](126) NULL, [ErrorLine] [int] NULL, [ErrorMessage] [nvarchar](4000) NOT NULL ) ON [PRIMARY];
[xml]
2
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
ALTER_TABLE
dbo
ErrorLog
ALTER TABLE [dbo].[ErrorLog] WITH CHECK ADD CONSTRAINT [PK_ErrorLog_ErrorLogID] PRIMARY KEY CLUSTERED ( [ErrorLogID] ) ON [PRIMARY]
[xml]
5
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TYPE
dbo
AccountNumber
CREATE TYPE [AccountNumber] FROM nvarchar(15) NULL;
[xml]
6
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TYPE
dbo
Flag
CREATE TYPE [Flag] FROM bit NOT NULL;
[xml]
21
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_XML_SCHEMA_COLLECTION
HumanResources
HRResumeSchemaCollection
CREATE XML SCHEMA COLLECTION [HumanResources].[HRResumeSchemaCollection] AS ' Home|Work|Permanent High School|Associate|Bachelor|Master|Doctorate In case the institution does not follow a GPA system ISO 3166 Country Code Voice|Fax|Pager ';
[xml]
23
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
ALTER_XML_SCHEMA_COLLECTION
Production
ProductDescriptionSchemaCollection
ALTER XML SCHEMA COLLECTION [Production].[ProductDescriptionSchemaCollection] ADD ' Product description has a summary blurb, if its manufactured elsewhere it includes a link to the manufacturers site for this component. Then it has optional zero or more sequences of features, pictures, categories and technical specifications. Pictures of the component, some standard sizes are "Large" for zoom in, "Small" for a normal web page and "Thumbnail" for product listing pages. Features of the component that are more "sales" oriented. A single technical aspect of the component. A single categorization element that designates a classification taxonomy and a code within that classification type. Optional description for default display if needed. ';
[xml]
3
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_PROCEDURE
dbo
uspPrintError
-- uspPrintError prints error information about the error that caused -- execution to jump to the CATCH block of a TRY...CATCH construct. -- Should be executed from within the scope of a CATCH block otherwise -- it will return without printing any error information. CREATE PROCEDURE [dbo].[uspPrintError] AS BEGIN SET NOCOUNT ON; -- Print error information. PRINT 'Error ' + CONVERT(varchar(50), ERROR_NUMBER()) + ', Severity ' + CONVERT(varchar(5), ERROR_SEVERITY()) + ', State ' + CONVERT(varchar(5), ERROR_STATE()) + ', Procedure ' + ISNULL(ERROR_PROCEDURE(), '-') + ', Line ' + CONVERT(varchar(5), ERROR_LINE()); PRINT ERROR_MESSAGE(); END;
[xml]
7
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TYPE
dbo
NameStyle
CREATE TYPE [NameStyle] FROM bit NOT NULL;
[xml]
8
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TYPE
dbo
Name
CREATE TYPE [Name] FROM nvarchar(50) NULL;
[xml]
9
Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)
dbo
CREATE_TYPE
dbo
OrderNumber
CREATE TYPE [OrderNumber] FROM nvarchar(25) NULL;
[xml]

ErrorLog

//
Audit table tracking errors in the the AdventureWorks database that are caught by the CATCH block of a TRY...CATCH construct. Data is inserted by stored procedure dbo.uspLogError when it is executed from inside the CATCH block of a TRY...CATCH construct.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

No Sample Data

HumanResources.Department

//
Lookup table containing the departments within the Adventure Works Cycles company.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

DepartmentID
Name
GroupName
ModifiedDate
1
Engineering
Research and Development
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Tool Design
Research and Development
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Sales
Sales and Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Marketing
Sales and Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Purchasing
Inventory Management
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Research and Development
Research and Development
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Production
Manufacturing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Production Control
Manufacturing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Human Resources
Executive General and Administration
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Finance
Executive General and Administration
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

HumanResources.Employee

//
Employee information such as salary, department, and title.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
NationalIDNumber
LoginID
OrganizationNode
OrganizationLevel
JobTitle
BirthDate
MaritalStatus
Gender
HireDate
SalariedFlag
VacationHours
SickLeaveHours
CurrentFlag
rowguid
ModifiedDate
1
295847284
adventure-works\ken0
[hierarchyid]
null
Chief Executive Officer
Tue Jan 28 1969 19:00:00 GMT-0500 (Eastern Standard Time)
S
M
Tue Jan 13 2009 19:00:00 GMT-0500 (Eastern Standard Time)
true
99
69
true
F01251E5-96A3-448D-981E-0F99D789110D
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
2
245797967
adventure-works\terri0
[hierarchyid]
1
Vice President of Engineering
Sat Jul 31 1971 20:00:00 GMT-0400 (Eastern Daylight Time)
S
F
Wed Jan 30 2008 19:00:00 GMT-0500 (Eastern Standard Time)
true
1
20
true
45E8F437-670D-4409-93CB-F9424A40D6EE
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
3
509647174
adventure-works\roberto0
[hierarchyid]
2
Engineering Manager
Mon Nov 11 1974 19:00:00 GMT-0500 (Eastern Standard Time)
M
M
Sat Nov 10 2007 19:00:00 GMT-0500 (Eastern Standard Time)
true
2
21
true
9BBBFB2C-EFBB-4217-9AB7-F97689328841
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
4
112457891
adventure-works\rob0
[hierarchyid]
3
Senior Tool Designer
Sun Dec 22 1974 19:00:00 GMT-0500 (Eastern Standard Time)
S
M
Tue Dec 04 2007 19:00:00 GMT-0500 (Eastern Standard Time)
false
48
80
true
59747955-87B8-443F-8ED4-F8AD3AFDF3A9
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
5
695256908
adventure-works\gail0
[hierarchyid]
3
Design Engineer
Fri Sep 26 1952 20:00:00 GMT-0400 (Eastern Daylight Time)
M
F
Sat Jan 05 2008 19:00:00 GMT-0500 (Eastern Standard Time)
true
5
22
true
EC84AE09-F9B8-4A15-B4A9-6CCBAB919B08
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
6
998320692
adventure-works\jossef0
[hierarchyid]
3
Design Engineer
Tue Mar 10 1959 19:00:00 GMT-0500 (Eastern Daylight Time)
M
M
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
true
6
23
true
E39056F1-9CD5-478D-8945-14ACA7FBDCDD
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
7
134969118
adventure-works\dylan0
[hierarchyid]
3
Research and Development Manager
Mon Feb 23 1987 19:00:00 GMT-0500 (Eastern Standard Time)
M
M
Sat Feb 07 2009 19:00:00 GMT-0500 (Eastern Standard Time)
true
61
50
true
4F46DECA-EF01-41FD-9829-0ADAB368E431
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
8
811994146
adventure-works\diane1
[hierarchyid]
4
Research and Development Engineer
Wed Jun 04 1986 20:00:00 GMT-0400 (Eastern Daylight Time)
S
F
Sun Dec 28 2008 19:00:00 GMT-0500 (Eastern Standard Time)
true
62
51
true
31112635-663B-4018-B4A2-A685C0BF48A4
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
9
658797903
adventure-works\gigi0
[hierarchyid]
4
Research and Development Engineer
Sat Jan 20 1979 19:00:00 GMT-0500 (Eastern Standard Time)
M
F
Thu Jan 15 2009 19:00:00 GMT-0500 (Eastern Standard Time)
true
63
51
true
50B6CDC6-7570-47EF-9570-48A64B5F2ECF
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
10
879342154
adventure-works\michael6
[hierarchyid]
4
Research and Development Manager
Thu Nov 29 1984 19:00:00 GMT-0500 (Eastern Standard Time)
M
M
Sat May 02 2009 20:00:00 GMT-0400 (Eastern Daylight Time)
true
16
64
true
EAA43680-5571-40CB-AB1A-3BF68F04459E
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)

HumanResources.EmployeeDepartmentHistory

//
Employee department transfers.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
DepartmentID
ShiftID
StartDate
EndDate
ModifiedDate
1
16
1
Tue Jan 13 2009 19:00:00 GMT-0500 (Eastern Standard Time)
null
Mon Jan 12 2009 19:00:00 GMT-0500 (Eastern Standard Time)
2
1
1
Wed Jan 30 2008 19:00:00 GMT-0500 (Eastern Standard Time)
null
Tue Jan 29 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
1
1
Sat Nov 10 2007 19:00:00 GMT-0500 (Eastern Standard Time)
null
Fri Nov 09 2007 19:00:00 GMT-0500 (Eastern Standard Time)
4
1
1
Tue Dec 04 2007 19:00:00 GMT-0500 (Eastern Standard Time)
Sat May 29 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 27 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
4
2
1
Sun May 30 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sat May 29 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
5
1
1
Sat Jan 05 2008 19:00:00 GMT-0500 (Eastern Standard Time)
null
Fri Jan 04 2008 19:00:00 GMT-0500 (Eastern Standard Time)
6
1
1
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
null
Tue Jan 22 2008 19:00:00 GMT-0500 (Eastern Standard Time)
7
6
1
Sat Feb 07 2009 19:00:00 GMT-0500 (Eastern Standard Time)
null
Fri Feb 06 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
6
1
Sun Dec 28 2008 19:00:00 GMT-0500 (Eastern Standard Time)
null
Sat Dec 27 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
6
1
Thu Jan 15 2009 19:00:00 GMT-0500 (Eastern Standard Time)
null
Wed Jan 14 2009 19:00:00 GMT-0500 (Eastern Standard Time)

HumanResources.EmployeePayHistory

//
Employee pay history.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
RateChangeDate
Rate
PayFrequency
ModifiedDate
1
Tue Jan 13 2009 19:00:00 GMT-0500 (Eastern Standard Time)
125.5
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Wed Jan 30 2008 19:00:00 GMT-0500 (Eastern Standard Time)
63.4615
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Sat Nov 10 2007 19:00:00 GMT-0500 (Eastern Standard Time)
43.2692
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Tue Dec 04 2007 19:00:00 GMT-0500 (Eastern Standard Time)
8.62
2
Tue Nov 20 2007 19:00:00 GMT-0500 (Eastern Standard Time)
4
Sun May 30 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
23.72
2
Sat May 15 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Wed Dec 14 2011 19:00:00 GMT-0500 (Eastern Standard Time)
29.8462
2
Wed Nov 30 2011 19:00:00 GMT-0500 (Eastern Standard Time)
5
Sat Jan 05 2008 19:00:00 GMT-0500 (Eastern Standard Time)
32.6923
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
32.6923
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Sat Feb 07 2009 19:00:00 GMT-0500 (Eastern Standard Time)
50.4808
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Sun Dec 28 2008 19:00:00 GMT-0500 (Eastern Standard Time)
40.8654
2
Sun Jun 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)

HumanResources.JobCandidate

//
Résumés submitted to Human Resources by job applicants.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

JobCandidateID
BusinessEntityID
Resume
ModifiedDate
1
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
2
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
3
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
4
274
[xml]
Sun Dec 22 2013 13:32:21 GMT-0500 (Eastern Standard Time)
5
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
6
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
7
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
8
212
[xml]
Sun Dec 22 2013 13:32:21 GMT-0500 (Eastern Standard Time)
9
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
10
null
[xml]
Fri Jun 22 2007 20:00:00 GMT-0400 (Eastern Daylight Time)

HumanResources.Shift

//
Work shift lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ShiftID
Name
StartTime
EndTime
ModifiedDate
1
Day
Thu Jan 01 1970 02:00:00 GMT-0500 (Eastern Standard Time)
Thu Jan 01 1970 10:00:00 GMT-0500 (Eastern Standard Time)
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Evening
Thu Jan 01 1970 10:00:00 GMT-0500 (Eastern Standard Time)
Thu Jan 01 1970 18:00:00 GMT-0500 (Eastern Standard Time)
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Night
Thu Jan 01 1970 18:00:00 GMT-0500 (Eastern Standard Time)
Thu Jan 01 1970 02:00:00 GMT-0500 (Eastern Standard Time)
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.Address

//
Street address information for customers, employees, and vendors.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

AddressID
AddressLine1
AddressLine2
City
StateProvinceID
PostalCode
SpatialLocation
rowguid
ModifiedDate
1
1970 Napa Ct.
null
Bothell
79
98011
[geography]
9AADCB0D-36CF-483F-84D8-585C2D4EC6E9
Mon Dec 03 2007 19:00:00 GMT-0500 (Eastern Standard Time)
2
9833 Mt. Dias Blv.
null
Bothell
79
98011
[geography]
32A54B9E-E034-4BFB-B573-A71CDE60D8C0
Sat Nov 29 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
7484 Roundtree Drive
null
Bothell
79
98011
[geography]
4C506923-6D1B-452C-A07C-BAA6F5B142A4
Wed Mar 06 2013 19:00:00 GMT-0500 (Eastern Standard Time)
4
9539 Glenside Dr
null
Bothell
79
98011
[geography]
E5946C78-4BCC-477F-9FA1-CC09DE16A880
Mon Feb 02 2009 19:00:00 GMT-0500 (Eastern Standard Time)
5
1226 Shoe St.
null
Bothell
79
98011
[geography]
FBAFF937-4A97-4AF0-81FD-B849900E9BB0
Thu Dec 18 2008 19:00:00 GMT-0500 (Eastern Standard Time)
6
1399 Firestone Drive
null
Bothell
79
98011
[geography]
FEBF8191-9804-44C8-877A-33FDE94F0075
Thu Feb 12 2009 19:00:00 GMT-0500 (Eastern Standard Time)
7
5672 Hale Dr.
null
Bothell
79
98011
[geography]
0175A174-6C34-4D41-B3C1-4419CD6A0446
Thu Dec 10 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
6387 Scenic Avenue
null
Bothell
79
98011
[geography]
3715E813-4DCA-49E0-8F1C-31857D21F269
Tue Dec 16 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
8713 Yosemite Ct.
null
Bothell
79
98011
[geography]
268AF621-76D7-4C78-9441-144FD139821A
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
10
250 Race Court
null
Bothell
79
98011
[geography]
0B6B739D-8EB6-4378-8D55-FE196AF34C04
Mon Dec 01 2008 19:00:00 GMT-0500 (Eastern Standard Time)

Person.AddressType

//
Types of addresses stored in the Address table.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

AddressTypeID
Name
rowguid
ModifiedDate
1
Billing
B84F78B1-4EFE-4A0E-8CB7-70E9F112F886
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Home
41BC2FF6-F0FC-475F-8EB9-CEC0805AA0F2
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Main Office
8EEEC28C-07A2-4FB9-AD0A-42D4A0BBC575
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Primary
24CB3088-4345-47C4-86C5-17B535133D1E
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Shipping
B29DA3F8-19A3-47DA-9DAA-15C84F4A83A5
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Archive
A67F238A-5BA2-444B-966C-0467ED9C427F
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.BusinessEntity

//
Source of the ID that connects vendors, customers, and employees with address and contact information.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

BusinessEntityID
rowguid
ModifiedDate
1
0C7D8F81-D7B1-4CF0-9C0A-4CD8B6B50087
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
2
6648747F-7843-4002-B317-65389684C398
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
3
568204DA-93D7-42F4-8A7A-4446A144277D
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
4
0EFF57B9-4F4F-41A6-8867-658C199A5FC0
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
5
B82F88D1-FF79-4FD9-8C54-9D24C140F647
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
6
1B3D077A-1941-4D6E-8328-F7DC03595565
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
7
C1898370-A36F-43A2-987C-0BF24FE3FB82
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
8
2B50ABB8-ABAB-412B-A4D0-4FD5EBEB5CBE
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
9
5C0AB449-A087-4D8D-834F-3726061B6BFA
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)
10
0F3CC1D7-F484-4BDE-B088-B11EF03E2F52
Wed Dec 13 2017 08:20:24 GMT-0500 (Eastern Standard Time)

Person.BusinessEntityAddress

//
Cross-reference table mapping customers, vendors, and employees to their addresses.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
AddressID
AddressTypeID
rowguid
ModifiedDate
1
249
2
3A5D0A00-6739-4DFE-A8F7-844CD9DEE3DF
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
2
293
2
84AE7057-EDF4-4C51-8B8D-3AEAEFBFB4A1
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
3
224
2
3C915B31-7C05-4A05-9859-0DF663677240
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
4
11387
2
3DC70CC4-3AE8-424F-8B1F-481C5478E941
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
5
190
2
C0ED2F68-937B-4594-9459-581AC53C98E3
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
6
286
2
4CA1686A-A7DF-4BD8-9D7D-82A63210208A
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
7
49
2
1528E305-3E34-4DEA-BDD7-C7DDCDD11EF8
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
8
230
2
38F80F8F-5CA7-4D06-AEFA-CD930A0A7B3F
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
9
187
2
51C9D232-DD34-49A5-8442-F269E0B9A6FF
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)
10
11386
2
13981FC6-9688-49C8-AA1E-80C7F28EA2FF
Fri Sep 12 2014 07:15:06 GMT-0400 (Eastern Daylight Time)

Person.BusinessEntityContact

//
Cross-reference table mapping stores, vendors, and employees to people

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
PersonID
ContactTypeID
rowguid
ModifiedDate
292
291
11
7D4D2DBC-4A44-48F5-911D-A63ABAFD5120
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
294
293
11
3EA25B65-9579-4260-977D-D6F00D7D20EE
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
296
295
11
DADAC1FF-3351-4827-9AE0-95004885C193
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
298
297
11
B924F26F-6446-45D1-A92B-6F418374F075
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
300
299
11
5BA4E7BE-8D29-46A2-B68D-67B1615B124A
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
302
301
11
6CC8F248-8D96-4AFD-ADCC-61D93E8DE3B1
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
304
303
11
33B4DA81-4448-481F-BF7C-357EA4D23F21
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
306
305
11
70D35526-7C2F-470F-98CB-F9299A754F16
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
308
307
14
DA33B75D-32FB-432D-A275-9E9D32E78F3E
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)
310
309
14
C2DEE145-A902-477E-AB21-29659AC3E97E
Wed Dec 13 2017 08:21:02 GMT-0500 (Eastern Standard Time)

Person.ContactType

//
Lookup table containing the types of business entity contacts.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ContactTypeID
Name
ModifiedDate
1
Accounting Manager
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Assistant Sales Agent
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Assistant Sales Representative
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Coordinator Foreign Markets
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Export Administrator
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
International Marketing Manager
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Marketing Assistant
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Marketing Manager
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Marketing Representative
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Order Administrator
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.CountryRegion

//
Lookup table containing the ISO standard codes for countries and regions.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

CountryRegionCode
Name
ModifiedDate
AD
Andorra
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AE
United Arab Emirates
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AF
Afghanistan
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AG
Antigua and Barbuda
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AI
Anguilla
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AL
Albania
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AM
Armenia
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AN
Netherlands Antilles
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AO
Angola
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AQ
Antarctica
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.EmailAddress

//
Where to send a person email.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
EmailAddressID
EmailAddress
rowguid
ModifiedDate
1
1
ken0@adventure-works.com
8A1901E4-671B-431A-871C-EADB2942E9EE
Tue Jan 06 2009 19:00:00 GMT-0500 (Eastern Standard Time)
2
2
terri0@adventure-works.com
B5FF9EFD-72A2-4F87-830B-F338FDD4D162
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
3
roberto0@adventure-works.com
C8A51084-1C03-4C58-A8B3-55854AE7C499
Sat Nov 03 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
4
4
rob0@adventure-works.com
17703ED1-0031-4B4A-AFD2-77487A556B3B
Tue Nov 27 2007 19:00:00 GMT-0500 (Eastern Standard Time)
5
5
gail0@adventure-works.com
E76D2EA3-08E5-409C-BBE2-5DD1CDF89A3B
Sat Dec 29 2007 19:00:00 GMT-0500 (Eastern Standard Time)
6
6
jossef0@adventure-works.com
A9C4093A-4F4A-4CAD-BBB4-2C4E920BACCB
Sun Dec 15 2013 19:00:00 GMT-0500 (Eastern Standard Time)
7
7
dylan0@adventure-works.com
70429DE4-C3BF-4F19-A00A-E976C8017FB3
Sat Jan 31 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
8
diane1@adventure-works.com
37F02A87-058D-49F8-A20D-965738B0A71F
Sun Dec 21 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
9
gigi0@adventure-works.com
F888A16D-0C33-459E-9D72-D16AE0BB1F43
Thu Jan 08 2009 19:00:00 GMT-0500 (Eastern Standard Time)
10
10
michael6@adventure-works.com
E0DD366D-433D-4F5A-9347-1A5FE7FBE0A3
Sat Apr 25 2009 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.Password

//
One way hashed authentication information

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
PasswordHash
PasswordSalt
rowguid
ModifiedDate
1
pbFwXWE99vobT6g+vPWFy93NtUU/orrIWafF01hccfM=
bE3XiWw=
329EACBE-C883-4F48-B8B6-17AA4627EFFF
Tue Jan 06 2009 19:00:00 GMT-0500 (Eastern Standard Time)
2
bawRVNrZQYQ05qF05Gz6VLilnviZmrqBReTTAGAudm0=
EjJaC3U=
A4C82398-7466-4FE6-B9EE-CEC34D116F68
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
8BUXrZfDqO1IyHCWOYzYmqN1IhTUn3CJMpdx/UCQ3iY=
wbPZqMw=
AC3F4536-BB2E-41C5-B70D-454BE460C1BD
Sat Nov 03 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
4
SjLXpiarHSlz+6AG+H+4QpB/IPRzras/+9q/5Wr7tf8=
PwSunQU=
B3FA4C24-2E96-477C-A923-0CB0F6FA5C80
Tue Nov 27 2007 19:00:00 GMT-0500 (Eastern Standard Time)
5
8FYdAiY6gWuBsgjCFdg0UibtsqOcWHf9TyaHIP7+paA=
qYhZRiM=
C4D13BCF-0209-44C7-AC67-6F817FDD7F16
Sat Dec 29 2007 19:00:00 GMT-0500 (Eastern Standard Time)
6
u5kbN5n84NRE1h/a+ktdRrXucjgrmfF6wZC4g82rjHM=
a9GiLUA=
BBE788B9-8D6D-4799-87A7-7B85B6BD67DC
Sun Dec 15 2013 19:00:00 GMT-0500 (Eastern Standard Time)
7
zSqerln8T8eq3nYHC4Lx4vMuxZaxkDylVwWnP2ZT6QA=
13mu8BA=
AFD3A20A-787B-4069-92DB-AEE666C02847
Sat Jan 31 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
s+FUWADIZzXBKpcbxe4OwL2uiJmjLogJNYXXHvc1X/k=
FlCpzTU=
4FE51B60-130E-4209-9E67-28DC4D91446C
Sun Dec 21 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
fCvCTy3RwzA2LNhhhYUbT7erkb9Au5wyM2q7ReHroV0=
FTcZMvQ=
99F4F320-F05D-4FA1-BB0D-81C9425422F3
Thu Jan 08 2009 19:00:00 GMT-0500 (Eastern Standard Time)
10
/8biMrxuAtETGeIuloSrMQHBraZtZ+eU2z5OJ1Fhn6M=
K7dMpTY=
82F25F0C-5D75-4246-958A-B6DF67559D09
Sat Apr 25 2009 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.Person

//
Human beings involved with AdventureWorks: employees, customer contacts, and vendor contacts.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
PersonType
NameStyle
Title
FirstName
MiddleName
LastName
Suffix
EmailPromotion
AdditionalContactInfo
Demographics
rowguid
ModifiedDate
1
EM
false
null
Ken
J
Sánchez
null
0
[xml]
[xml]
92C4279F-1207-48A3-8448-4636514EB7E2
Tue Jan 06 2009 19:00:00 GMT-0500 (Eastern Standard Time)
2
EM
false
null
Terri
Lee
Duffy
null
1
[xml]
[xml]
D8763459-8AA8-47CC-AFF7-C9079AF79033
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
EM
false
null
Roberto
null
Tamburello
null
0
[xml]
[xml]
E1A2555E-0828-434B-A33B-6F38136A37DE
Sat Nov 03 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
4
EM
false
null
Rob
null
Walters
null
0
[xml]
[xml]
F2D7CE06-38B3-4357-805B-F4B6B71C01FF
Tue Nov 27 2007 19:00:00 GMT-0500 (Eastern Standard Time)
5
EM
false
Ms.
Gail
A
Erickson
null
0
[xml]
[xml]
F3A3F6B4-AE3B-430C-A754-9F2231BA6FEF
Sat Dec 29 2007 19:00:00 GMT-0500 (Eastern Standard Time)
6
EM
false
Mr.
Jossef
H
Goldberg
null
0
[xml]
[xml]
0DEA28FD-EFFE-482A-AFD3-B7E8F199D56F
Sun Dec 15 2013 19:00:00 GMT-0500 (Eastern Standard Time)
7
EM
false
null
Dylan
A
Miller
null
2
[xml]
[xml]
C45E8AB8-01BE-4B76-B215-820C8368181A
Sat Jan 31 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
EM
false
null
Diane
L
Margheim
null
0
[xml]
[xml]
A948E590-4A56-45A9-BC9A-160A1CC9D990
Sun Dec 21 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
EM
false
null
Gigi
N
Matthew
null
0
[xml]
[xml]
5FC28C0E-6D36-4252-9846-05CAA0B1F6C5
Thu Jan 08 2009 19:00:00 GMT-0500 (Eastern Standard Time)
10
EM
false
null
Michael
null
Raheem
null
2
[xml]
[xml]
CA2C740E-75B2-420C-9D4B-E3CBC6609604
Sat Apr 25 2009 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.PersonPhone

//
Telephone number and type of a person.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
PhoneNumber
PhoneNumberTypeID
ModifiedDate
1
697-555-0142
1
Tue Jan 06 2009 19:00:00 GMT-0500 (Eastern Standard Time)
2
819-555-0175
3
Wed Jan 23 2008 19:00:00 GMT-0500 (Eastern Standard Time)
3
212-555-0187
1
Sat Nov 03 2007 20:00:00 GMT-0400 (Eastern Daylight Time)
4
612-555-0100
1
Tue Nov 27 2007 19:00:00 GMT-0500 (Eastern Standard Time)
5
849-555-0139
1
Sat Dec 29 2007 19:00:00 GMT-0500 (Eastern Standard Time)
6
122-555-0189
3
Sun Dec 15 2013 19:00:00 GMT-0500 (Eastern Standard Time)
7
181-555-0156
3
Sat Jan 31 2009 19:00:00 GMT-0500 (Eastern Standard Time)
8
815-555-0138
1
Sun Dec 21 2008 19:00:00 GMT-0500 (Eastern Standard Time)
9
185-555-0186
1
Thu Jan 08 2009 19:00:00 GMT-0500 (Eastern Standard Time)
10
330-555-2568
3
Sat Apr 25 2009 20:00:00 GMT-0400 (Eastern Daylight Time)

Person.PhoneNumberType

//
Type of phone number of a person.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

PhoneNumberTypeID
Name
ModifiedDate
1
Cell
Wed Dec 13 2017 08:19:22 GMT-0500 (Eastern Standard Time)
2
Home
Wed Dec 13 2017 08:19:22 GMT-0500 (Eastern Standard Time)
3
Work
Wed Dec 13 2017 08:19:22 GMT-0500 (Eastern Standard Time)

Person.StateProvince

//
State and province lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

StateProvinceID
StateProvinceCode
CountryRegionCode
IsOnlyStateProvinceFlag
Name
TerritoryID
rowguid
ModifiedDate
1
AB
CA
false
Alberta
6
298C2880-AB1C-4982-A5AD-A36EB4BA0D34
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
2
AK
US
false
Alaska
1
5B7B8462-A888-4E0B-A3E1-7278F8AF107E
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
3
AL
US
false
Alabama
5
41B328BE-21AE-45D0-841D-6F8DD71CE626
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
4
AR
US
false
Arkansas
3
54656A80-06F2-4C70-BA10-247179FC246E
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
5
AS
AS
true
American Samoa
1
255D15E1-9F6E-4CF8-9E5F-6B3858AD9B6A
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
6
AZ
US
false
Arizona
4
FB8BE18E-F441-44F0-A4A9-1D0F204CB701
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
7
BC
CA
false
British Columbia
6
D27FCC6E-BB99-438B-BA86-285CEEB2FA53
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
8
BY
DE
false
Bayern
8
D54E5000-A0DA-46D1-86B0-B8FE16C9F781
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
9
CA
US
false
California
4
3B2FF23C-1C75-40AE-9093-F4EB42263F4E
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
10
CO
US
false
Colorado
3
292DF595-7D3C-41FB-A040-7C184D379FCE
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)

Production.BillOfMaterials

//
Items required to make bicycles and bicycle subassemblies. It identifies the heirarchical relationship between a parent product and its components.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BillOfMaterialsID
ProductAssemblyID
ComponentID
StartDate
EndDate
UnitMeasureCode
BOMLevel
PerAssemblyQty
ModifiedDate
893
null
749
Tue May 25 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
EA
0
1
Tue May 11 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
271
null
750
Wed Mar 03 2010 19:00:00 GMT-0500 (Eastern Standard Time)
Sun May 02 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
EA
0
1
Sun May 02 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
34
null
750
Mon May 03 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
EA
0
1
Mon Apr 19 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
830
null
751
Tue May 25 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
EA
0
1
Tue May 11 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
2074
null
752
Wed Jul 07 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
EA
0
1
Wed Jun 23 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
1950
null
753
Fri Jun 18 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue Aug 17 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
EA
0
1
Tue Aug 17 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
1761
null
753
Wed Aug 18 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
null
EA
0
1
Wed Aug 04 2010 20:00:00 GMT-0400 (Eastern Daylight Time)
3088
null
754
Tue Dec 14 2010 19:00:00 GMT-0500 (Eastern Standard Time)
null
EA
0
1
Tue Nov 30 2010 19:00:00 GMT-0500 (Eastern Standard Time)
3351
null
755
Wed Dec 22 2010 19:00:00 GMT-0500 (Eastern Standard Time)
null
EA
0
1
Wed Dec 08 2010 19:00:00 GMT-0500 (Eastern Standard Time)
3246
null
756
Wed Dec 22 2010 19:00:00 GMT-0500 (Eastern Standard Time)
null
EA
0
1
Wed Dec 08 2010 19:00:00 GMT-0500 (Eastern Standard Time)

Production.Culture

//
Lookup table containing the languages in which some AdventureWorks data is stored.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

CultureID
Name
ModifiedDate
Invariant Language (Invariant Country)
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
ar
Arabic
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
en
English
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
es
Spanish
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
fr
French
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
he
Hebrew
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
th
Thai
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
zh-cht
Chinese
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.Document

//
Product maintenance documents.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

DocumentNode
DocumentLevel
Title
Owner
FolderFlag
FileName
FileExtension
Revision
ChangeNumber
Status
DocumentSummary
Document
rowguid
ModifiedDate
[hierarchyid]
0
Documents
217
true
Documents
0
0
2
null
[varbinary]
27CF33AF-C338-4842-966C-75CA11AAA6A3
Wed Dec 13 2017 08:58:03 GMT-0500 (Eastern Standard Time)
[hierarchyid]
1
Overview
217
true
Overview
0
0
2
null
[varbinary]
26A266F1-1D23-40E2-AF48-6AB8D954FE37
Wed Dec 13 2017 08:58:03 GMT-0500 (Eastern Standard Time)
[hierarchyid]
2
Introduction 1
219
false
Introduction 1.doc
.doc
4
28
2
null
[varbinary]
48265174-8451-4967-973A-639C2276CFAF
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
[hierarchyid]
2
Repair and Service Guidelines
220
false
Repair and Service Guidelines.doc
.doc
0
8
2
It is important that you maintain your bicycle and keep it in good repair. Detailed repair and service guidelines are provided along with instructions for adjusting the tightness of the suspension fork.
[varbinary]
7ED4DEF5-D5BB-4818-8748-5BB5F8315FA2
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
[hierarchyid]
1
Maintenance
217
true
Maintenance
0
0
2
null
[varbinary]
5184D96A-EE8C-499A-9316-625496784DE6
Wed Dec 13 2017 08:58:04 GMT-0500 (Eastern Standard Time)
[hierarchyid]
2
Crank Arm and Tire Maintenance
219
false
Crank Arm and Tire Maintenance.doc
.doc
0
0
1
null
[varbinary]
D11B82B0-EB40-4A66-8193-15F765A61F05
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
[hierarchyid]
2
Lubrication Maintenance
219
false
Lubrication Maintenance.doc
.doc
2
11
1
Guidelines and recommendations for lubricating the required components of your Adventure Works Cycles bicycle. Component lubrication is vital to ensuring a smooth and safe ride and should be part of your standard maintenance routine. Details instructions are provided for each bicycle component requiring regular lubrication including the frequency at which oil or grease should be applied.
[varbinary]
2A8BD319-36FB-4FBA-9E07-E303839F1974
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
[hierarchyid]
1
Assembly
217
true
Assembly
0
0
2
null
[varbinary]
F4F544AE-381A-4323-9A59-F5A629E21F46
Wed Dec 13 2017 08:58:04 GMT-0500 (Eastern Standard Time)
[hierarchyid]
2
Front Reflector Bracket and Reflector Assembly 3
220
false
Front Reflector Bracket and Reflector Assembly 3.doc
.doc
3
25
2
null
[varbinary]
82F61D73-0BF5-44FF-AB99-DD73AEE9B9CC
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
[hierarchyid]
2
Front Reflector Bracket Installation
220
false
Front Reflector Bracket Installation.doc
.doc
1
15
2
Reflectors are vital safety components of your bicycle. Always ensure your front and back reflectors are clean and in good repair. Detailed instructions and illustrations are included should you need to replace the front reflector or front reflector bracket of your Adventure Works Cycles bicycle.
[varbinary]
52F6BE23-5363-4D93-96AE-F714B851E52C
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.Illustration

//
Bicycle assembly diagrams.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

IllustrationID
Diagram
ModifiedDate
3
[xml]
Thu Jan 09 2014 08:06:11 GMT-0500 (Eastern Standard Time)
4
[xml]
Thu Jan 09 2014 08:06:11 GMT-0500 (Eastern Standard Time)
5
[xml]
Thu Jan 09 2014 08:06:11 GMT-0500 (Eastern Standard Time)
6
[xml]
Thu Jan 09 2014 08:06:12 GMT-0500 (Eastern Standard Time)
7
[xml]
Thu Jan 09 2014 08:06:12 GMT-0500 (Eastern Standard Time)

Production.Location

//
Product inventory and manufacturing locations.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Check Constraints

Sample Data

LocationID
Name
CostRate
Availability
ModifiedDate
1
Tool Crib
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Sheet Metal Racks
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Paint Shop
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Paint Storage
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Metal Storage
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Miscellaneous Storage
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Finished Goods Storage
0
0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Frame Forming
22.5
96
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
20
Frame Welding
25
108
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
30
Debur and Polish
14.5
120
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.Product

//
Products sold or used in the manfacturing of sold products.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductID
Name
ProductNumber
MakeFlag
FinishedGoodsFlag
Color
SafetyStockLevel
ReorderPoint
StandardCost
ListPrice
Size
SizeUnitMeasureCode
WeightUnitMeasureCode
Weight
DaysToManufacture
ProductLine
Class
Style
ProductSubcategoryID
ProductModelID
SellStartDate
SellEndDate
DiscontinuedDate
rowguid
ModifiedDate
1
Adjustable Race
AR-5381
false
false
null
1000
750
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
694215B7-08F7-4C0D-ACB1-D734BA44C0C8
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
2
Bearing Ball
BA-8327
false
false
null
1000
750
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
58AE3C20-4F3A-4749-A7D4-D568806CC537
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
3
BB Ball Bearing
BE-2349
true
false
null
800
600
0
0
null
null
null
null
1
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
9C21AED2-5BFA-4F18-BCB8-F11638DC2E4E
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
4
Headset Ball Bearings
BE-2908
false
false
null
800
600
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
ECFED6CB-51FF-49B5-B06C-7D8AC834DB8B
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
316
Blade
BL-2036
true
false
null
800
600
0
0
null
null
null
null
1
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
E73E9750-603B-4131-89F5-3DD15ED5FF80
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
317
LL Crankarm
CA-5965
false
false
Black
500
375
0
0
null
null
null
null
0
null
L
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
3C9D10B7-A6B2-4774-9963-C19DCEE72FEA
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
318
ML Crankarm
CA-6738
false
false
Black
500
375
0
0
null
null
null
null
0
null
M
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
EABB9A92-FA07-4EAB-8955-F0517B4A4CA7
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
319
HL Crankarm
CA-7457
false
false
Black
500
375
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
7D3FD384-4F29-484B-86FA-4206E276FE58
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
320
Chainring Bolts
CB-2903
false
false
Silver
1000
750
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
7BE38E48-B7D6-4486-888E-F53C26735101
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)
321
Chainring Nut
CN-6137
false
false
Silver
1000
750
0
0
null
null
null
null
0
null
null
null
null
null
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
null
null
3314B1D7-EF69-4431-B6DD-DC75268BD5DF
Sat Feb 08 2014 05:01:36 GMT-0500 (Eastern Standard Time)

Production.ProductCategory

//
High-level product categorization.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ProductCategoryID
Name
rowguid
ModifiedDate
1
Bikes
CFBDA25C-DF71-47A7-B81B-64EE161AA37C
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Components
C657828D-D808-4ABA-91A3-AF2CE02300E9
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Clothing
10A7C342-CA82-48D4-8A38-46A2EB089B74
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Accessories
2BE3BE36-D9A2-4EEE-B593-ED895D97C2A6
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductCostHistory

//
Changes in the cost of a product over time.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductID
StartDate
EndDate
StandardCost
ModifiedDate
707
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
12.0278
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
707
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
13.8782
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
707
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
null
13.0863
Wed May 15 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
12.0278
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
13.8782
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
null
13.0863
Wed May 15 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
709
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
3.3963
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
710
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
3.3963
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
711
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
12.0278
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
711
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
13.8782
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductDescription

//
Product descriptions in several languages.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ProductDescriptionID
Description
rowguid
ModifiedDate
3
Chromoly steel.
301EED3A-1A82-4855-99CB-2AFE8290D641
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Aluminum alloy cups; large diameter spindle.
DFEBA528-DA11-4650-9D86-CAFDA7294EB0
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Aluminum alloy cups and a hollow axle.
F7178DA7-1A7E-4997-8470-06737181305E
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Suitable for any type of riding, on or off-road. Fits any budget. Smooth-shifting with a comfortable ride.
8E6746E5-AD97-46E2-BD24-FCEA075C3B52
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
64
This bike delivers a high-level of performance on a budget. It is responsive and maneuverable, and offers peace-of-mind when you decide to go off-road.
7B1C4E90-85E2-4792-B47B-E0C424E2EC94
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
88
For true trail addicts. An extremely durable bike that will go anywhere and keep you in control on challenging terrain - without breaking your budget.
4C1AD253-357E-4A98-B02E-02180AA406F6
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
128
Serious back-country riding. Perfect for all levels of competition. Uses the same HL Frame as the Mountain-100.
130709E6-8512-49B9-9F62-1F5C99152056
Sat Feb 08 2014 05:32:17 GMT-0500 (Eastern Standard Time)
168
Top-of-the-line competition mountain bike. Performance-enhancing options include the innovative HL Frame, super-smooth front suspension, and traction for all terrain.
DB979DA6-4CC8-4171-9ECF-65003FF8178A
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
170
Suitable for any type of off-road trip. Fits any budget.
EA772412-6369-4416-9CC9-C1A5D1FF9C52
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
209
Entry level adult bike; offers a comfortable ride cross-country or down the block. Quick-release hubs and rims.
F5FF5FFD-CB7C-4AD6-BBC9-4D250BB6E98D
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductDocument

//
Cross-reference table mapping products to related product documents.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

ProductID
DocumentNode
ModifiedDate
317
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
318
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
319
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
506
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
506
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
514
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
515
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
516
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
517
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)
518
[hierarchyid]
Sun Dec 29 2013 08:51:58 GMT-0500 (Eastern Standard Time)

Production.ProductInventory

//
Product inventory information.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductID
LocationID
Shelf
Bin
Quantity
rowguid
ModifiedDate
1
1
A
1
408
47A24246-6C43-48EB-968F-025738A8A410
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
1
6
B
5
324
D4544D7D-CAF5-46B3-AB22-5718DCC26B5E
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
1
50
A
5
353
BFF7DC60-96A8-43CA-81A7-D6D2ED3000A8
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1
A
2
427
F407C07A-CA14-4684-A02C-608BD00C2233
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
2
6
B
1
318
CA1FF2F4-48FB-4960-8D92-3940B633E4C1
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
2
50
A
6
364
D38CFBEE-6347-47B1-B033-0E278CCA03E2
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
3
1
A
7
585
E18A519B-FB5E-4051-874C-58CD58436C95
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
6
B
9
443
3C860C96-15FF-4DF4-91D7-B237FF64480F
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
50
A
10
324
1339E5E3-1F8E-4B82-A447-A8666A264F0C
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
1
A
6
512
6BEAF0A0-971A-4CE1-96FE-692807D5DC00
Thu Aug 07 2014 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductListPriceHistory

//
Changes in the list price of a product over time.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductID
StartDate
EndDate
ListPrice
ModifiedDate
707
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
707
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
707
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
null
34.99
Wed May 08 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
708
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
null
34.99
Wed May 08 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
709
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
9.5
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
710
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
9.5
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
711
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
711
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
33.6442
Tue May 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductModel

//
Product model classification.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ProductModelID
Name
CatalogDescription
Instructions
rowguid
ModifiedDate
1
Classic Vest
[xml]
[xml]
29321D47-1E4C-4AAC-887C-19634328C25E
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Cycling Cap
[xml]
[xml]
474FB654-3C96-4CB9-82DF-2152EEFFBDB0
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Full-Finger Gloves
[xml]
[xml]
A75483FE-3C47-4AA4-93CF-664B51192987
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Half-Finger Gloves
[xml]
[xml]
14B56F2A-D4AA-40A4-B9A2-984F165ED702
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
5
HL Mountain Frame
[xml]
[xml]
FDD5407B-C2DB-49D1-A86B-C13A2E3582A2
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
HL Road Frame
[xml]
[xml]
4D332ECC-48B3-4E04-B7E7-227F3AC2A7EC
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
HL Touring Frame
[xml]
[xml]
D60ED2A5-C100-4C54-89A1-531404C4A20F
Wed Apr 15 2015 12:34:28 GMT-0400 (Eastern Daylight Time)
8
LL Mountain Frame
[xml]
[xml]
65BF3F6D-BCF2-4DB6-8515-FC5C57423037
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
9
LL Road Frame
[xml]
[xml]
DDC67A2F-024A-4446-9B54-3C679BABA708
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
10
LL Touring Frame
[xml]
[xml]
66C63844-2A24-473C-96D5-D3B3FD57D834
Wed Apr 15 2015 12:34:28 GMT-0400 (Eastern Daylight Time)

Production.ProductModelIllustration

//
Cross-reference table mapping product models and illustrations.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

ProductModelID
IllustrationID
ModifiedDate
7
3
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
10
3
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
47
4
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
47
5
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
48
4
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
48
5
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)
67
6
Thu Jan 09 2014 09:41:02 GMT-0500 (Eastern Standard Time)

Production.ProductModelProductDescriptionCulture

//
Cross-reference table mapping product descriptions and the language the description is written in.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

ProductModelID
ProductDescriptionID
CultureID
ModifiedDate
1
1199
en
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
1
1467
ar
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
1
1589
fr
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
1
1712
th
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
1
1838
he
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
1
1965
zh-cht
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1210
en
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1476
ar
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1598
fr
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1721
th
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductPhoto

//
Product images.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ProductPhotoID
ThumbNailPhoto
ThumbnailPhotoFileName
LargePhoto
LargePhotoFileName
ModifiedDate
1
[varbinary]
no_image_available_small.gif
[varbinary]
no_image_available_large.gif
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
69
[varbinary]
racer02_black_f_small.gif
[varbinary]
racer02_black_f_large.gif
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
70
[varbinary]
racer02_black_small.gif
[varbinary]
racer02_black_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
72
[varbinary]
racer02_blue_f_small.gif
[varbinary]
racer02_blue_f_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
73
[varbinary]
racer02_blue_small.gif
[varbinary]
racer02_blue_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
76
[varbinary]
racer02_green_f_small.gif
[varbinary]
racer02_green_f_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
77
[varbinary]
racer02_green_small.gif
[varbinary]
racer02_green_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
78
[varbinary]
hotrodbike_black_small.gif
[varbinary]
hotrodbike_black_large.gif
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
79
[varbinary]
hotrodbike_blue_small.gif
[varbinary]
hotrodbike_blue_large.gif
Fri Oct 19 2012 05:56:38 GMT-0400 (Eastern Daylight Time)
80
[varbinary]
hotrodbike_f_small.gif
[varbinary]
hotrodbike_f_large.gif
Mon Apr 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductProductPhoto

//
Cross-reference table mapping products and product photos.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

ProductID
ProductPhotoID
Primary
ModifiedDate
1
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
316
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
317
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
318
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
319
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
320
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
321
1
true
Sun Mar 30 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ProductReview

//
Customer reviews of products they have purchased.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductReviewID
ProductID
ReviewerName
ReviewDate
EmailAddress
Rating
Comments
ModifiedDate
1
709
John Smith
Tue Sep 17 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
john@fourthcoffee.com
5
I can't believe I'm singing the praises of a pair of socks, but I just came back from a grueling 3-day ride and these socks really helped make the trip a blast. They're lightweight yet really cushioned my feet all day. The reinforced toe is nearly bullet-proof and I didn't experience any problems with rubbing or blisters like I have with other brands. I know it sounds silly, but it's always the little stuff (like comfortable feet) that makes or breaks a long trip. I won't go on another trip without them!
Tue Sep 17 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
937
David
Tue Nov 12 2013 19:00:00 GMT-0500 (Eastern Standard Time)
david@graphicdesigninstitute.com
4
A little on the heavy side, but overall the entry/exit is easy in all conditions. I've used these pedals for more than 3 years and I've never had a problem. Cleanup is easy. Mud and sand don't get trapped. I would like them even better if there was a weight reduction. Maybe in the next design. Still, I would recommend them to a friend.
Tue Nov 12 2013 19:00:00 GMT-0500 (Eastern Standard Time)
3
937
Jill
Thu Nov 14 2013 19:00:00 GMT-0500 (Eastern Standard Time)
jill@margiestravel.com
2
Maybe it's just because I'm new to mountain biking, but I had a terrible time getting use to these pedals. In my first outing, I wiped out trying to release my foot. Any suggestions on ways I can adjust the pedals, or is it just a learning curve thing?
Thu Nov 14 2013 19:00:00 GMT-0500 (Eastern Standard Time)
4
798
Laura Norman
Thu Nov 14 2013 19:00:00 GMT-0500 (Eastern Standard Time)
laura@treyresearch.net
5
The Road-550-W from Adventure Works Cycles is everything it's advertised to be. Finally, a quality bike that is actually built for a woman and provides control and comfort in one neat package. The top tube is shorter, the suspension is weight-tuned and there's a much shorter reach to the brake levers. All this adds up to a great mountain bike that is sure to accommodate any woman's anatomy. In addition to getting the size right, the saddle is incredibly comfortable. Attention to detail is apparent in every aspect from the frame finish to the careful design of each component. Each component is a solid performer without any fluff. The designers clearly did their homework and thought about size, weight, and funtionality throughout. And at less than 19 pounds, the bike is manageable for even the most petite cyclist. We had 5 riders take the bike out for a spin and really put it to the test. The results were consistent and very positive. Our testers loved the manuverability and control they had with the redesigned frame on the 550-W. A definite improvement over the 2002 design. Four out of five testers listed quick handling and responsivness were the key elements they noticed. Technical climbing and on the flats, the bike just cruises through the rough. Tight corners and obstacles were handled effortlessly. The fifth tester was more impressed with the smooth ride. The heavy-duty shocks absorbed even the worst bumps and provided a soft ride on all but the nastiest trails and biggest drops. The shifting was rated superb and typical of what we've come to expect from Adventure Works Cycles. On descents, the bike handled flawlessly and tracked very well. The bike is well balanced front-to-rear and frame flex was minimal. In particular, the testers noted that the brake system had a unique combination of power and modulation. While some brake setups can be overly touchy, these brakes had a good amount of power, but also a good feel that allows you to apply as little or as much braking power as is needed. Second is their short break-in period. We found that they tend to break-in well before the end of the first ride; while others take two to three rides (or more) to come to full power. On the negative side, the pedals were not quite up to our tester's standards. Just for fun, we experimented with routine maintenance tasks. Overall we found most operations to be straight forward and easy to complete. The only exception was replacing the front wheel. The maintenance manual that comes with the bike say to install the front wheel with the axle quick release or bolt, then compress the fork a few times before fastening and tightening the two quick-release mechanisms on the bottom of the dropouts. This is to seat the axle in the dropouts, and if you do not do this, the axle will become seated after you tightened the two bottom quick releases, which will then become loose. It's better to test the tightness carefully or you may notice that the two bottom quick releases have come loose enough to fall completely open. And that's something you don't want to experience while out on the road! The Road-550-W frame is available in a variety of sizes and colors and has the same durable, high-quality aluminum that AWC is known for. At a MSRP of just under $1125.00, it's comparable in price to its closest competitors and we think that after a test drive you'l find the quality and performance above and beyond . You'll have a grin on your face and be itching to get out on the road for more. While designed for serious road racing, the Road-550-W would be an excellent choice for just about any terrain and any level of experience. It's a huge step in the right direction for female cyclists and well worth your consideration and hard-earned money.
Thu Nov 14 2013 19:00:00 GMT-0500 (Eastern Standard Time)

Production.ProductSubcategory

//
Product subcategories. See ProductCategory table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

ProductSubcategoryID
ProductCategoryID
Name
rowguid
ModifiedDate
1
1
Mountain Bikes
2D364ADE-264A-433C-B092-4FCBF3804E01
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1
Road Bikes
000310C0-BCC8-42C4-B0C3-45AE611AF06B
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
1
Touring Bikes
02C5061D-ECDC-4274-B5F1-E91D76BC3F37
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
2
Handlebars
3EF2C725-7135-4C85-9AE6-AE9A3BDD9283
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
2
Bottom Brackets
A9E54089-8A1E-4CF5-8646-E3801F685934
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
2
Brakes
D43BA4A3-EF0D-426B-90EB-4BE4547DD30C
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
2
Chains
E93A7231-F16C-4B0F-8C41-C73FDEC62DA0
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
2
Cranksets
4F644521-422B-4F19-974A-E3DF6102567E
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
2
Derailleurs
1830D70C-AA2A-40C0-A271-5BA86F38F8BF
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
2
Forks
B5F9BA42-B69B-4FDD-B2EC-57FB7B42E3CF
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.ScrapReason

//
Manufacturing failure reasons lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

ScrapReasonID
Name
ModifiedDate
1
Brake assembly not as ordered
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Color incorrect
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Gouge in metal
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Drill pattern incorrect
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Drill size too large
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Drill size too small
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Handling damage
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Paint process failed
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Primer process failed
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Seat assembly not as ordered
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.TransactionHistory

//
Record of each purchase order, sales order, or work order transaction year to date.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

TransactionID
ProductID
ReferenceOrderID
ReferenceOrderLineID
TransactionDate
TransactionType
Quantity
ActualCost
ModifiedDate
100000
784
41590
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
2
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100001
794
41591
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100002
797
41592
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100003
798
41593
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100004
799
41594
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100005
800
41595
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100006
801
41596
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100007
954
41597
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100008
955
41598
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
100009
966
41599
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
W
1
0
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.TransactionHistoryArchive

//
Transactions for previous years.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:33 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Check Constraints

Sample Data

TransactionID
ProductID
ReferenceOrderID
ReferenceOrderLineID
TransactionDate
TransactionType
Quantity
ActualCost
ModifiedDate
1
1
1
1
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
4
50.26
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
359
2
1
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
3
45.12
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
360
2
2
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
3
45.5805
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
530
3
1
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
16.086
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
4
4
1
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
3
57.0255
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
512
5
1
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
37.086
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
513
6
1
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
26.5965
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
8
317
7
1
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
27.0585
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
9
318
7
2
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
33.579
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
10
319
7
3
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
P
550
46.0635
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.UnitMeasure

//
Unit of measure lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

UnitMeasureCode
Name
ModifiedDate
BOX
Boxes
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
BTL
Bottle
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
C
Celsius
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CAN
Canister
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CAR
Carton
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CBM
Cubic meters
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CCM
Cubic centimeter
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CDM
Cubic decimeter
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CM
Centimeter
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
CM2
Square centimeter
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.WorkOrder

//
Manufacturing work orders.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

WorkOrderID
ProductID
OrderQty
StockedQty
ScrappedQty
StartDate
EndDate
DueDate
ScrapReasonID
ModifiedDate
1
722
8
8
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
725
15
15
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
726
9
9
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
729
16
16
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
730
14
14
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
732
16
16
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
733
4
4
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
8
738
19
19
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
9
741
2
2
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
10
742
3
3
0
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
Sun Jun 12 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Production.WorkOrderRouting

//
Work order details.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

WorkOrderID
ProductID
OperationSequence
LocationID
ScheduledStartDate
ScheduledEndDate
ActualStartDate
ActualEndDate
ActualResourceHrs
PlannedCost
ActualCost
ModifiedDate
13
747
1
10
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4.1
92.25
92.25
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
13
747
2
20
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3.5
87.5
87.5
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
13
747
3
30
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
14.5
14.5
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
13
747
4
40
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
31.5
31.5
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
13
747
6
50
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
36.75
36.75
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
13
747
7
60
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
49
49
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
14
748
1
10
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4.1
92.25
92.25
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
14
748
2
20
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3.5
87.5
87.5
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
14
748
3
30
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
14.5
14.5
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
14
748
5
45
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 02 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
36
36
Sat Jun 18 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Purchasing.ProductVendor

//
Cross-reference table mapping vendors with the products they supply.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ProductID
BusinessEntityID
AverageLeadTime
StandardPrice
LastReceiptCost
LastReceiptDate
MinOrderQty
MaxOrderQty
OnOrderQty
UnitMeasureCode
ModifiedDate
1
1580
17
47.87
50.2635
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
5
3
CS
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
1688
19
39.92
41.916
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
5
3
CTN
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
1650
17
54.31
57.0255
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
5
null
CTN
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
317
1578
19
28.17
29.5785
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
300
EA
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
317
1678
17
25.77
27.0585
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
null
EA
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
318
1578
19
34.38
36.099
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
null
EA
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
318
1678
17
31.98
33.579
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
300
EA
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
319
1556
19
44.21
46.4205
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
300
EA
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
319
1578
19
46.27
48.5835
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
null
EA
Sun Aug 28 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
319
1678
17
43.87
46.0635
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
100
1000
null
EA
Wed Aug 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Purchasing.PurchaseOrderDetail

//
Individual products associated with a specific purchase order. See PurchaseOrderHeader.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

PurchaseOrderID
PurchaseOrderDetailID
DueDate
OrderQty
ProductID
UnitPrice
LineTotal
ReceivedQty
RejectedQty
StockedQty
ModifiedDate
1
1
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
1
50.26
201.04
3
0
3
Fri Apr 22 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
2
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
359
45.12
135.36
3
0
3
Fri Apr 22 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
3
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
360
45.5805
136.7415
3
0
3
Fri Apr 22 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
4
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
530
16.086
8847.3
550
0
550
Fri Apr 22 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
5
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
4
57.0255
171.0765
2
1
1
Fri Apr 22 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
6
Fri May 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
512
37.086
20397.3
550
0
550
Fri May 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
7
Fri May 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
513
26.5965
14628.075
468
0
468
Fri May 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
8
Fri May 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
317
27.0585
14882.175
550
0
550
Fri May 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
9
Fri May 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
318
33.579
18468.45
550
0
550
Fri May 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
10
Fri May 13 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
550
319
46.0635
25334.925
550
0
550
Fri May 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Purchasing.PurchaseOrderHeader

//
General purchase order information. See PurchaseOrderDetail.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

PurchaseOrderID
RevisionNumber
Status
EmployeeID
VendorID
ShipMethodID
OrderDate
ShipDate
SubTotal
TaxAmt
Freight
TotalDue
ModifiedDate
1
4
4
258
1580
3
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
201.04
16.0832
5.026
222.1492
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
4
1
254
1496
5
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
272.1015
21.7681
6.8025
300.6721
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
4
4
257
1494
2
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
8847.3
707.784
221.1825
9776.2665
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
4
3
261
1650
5
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
171.0765
13.6861
4.2769
189.0395
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
4
4
251
1654
4
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
20397.3
1631.784
509.9325
22539.0165
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
4
4
253
1664
3
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
14628.075
1170.246
365.7019
16164.0229
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
4
4
255
1678
3
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
58685.55
4694.844
1467.1388
64847.5328
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
8
4
4
256
1616
5
Fri Apr 29 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
693.378
55.4702
17.3345
766.1827
Sun May 08 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
9
5
4
259
1492
5
Tue Dec 13 2011 19:00:00 GMT-0500 (Eastern Standard Time)
Thu Dec 22 2011 19:00:00 GMT-0500 (Eastern Standard Time)
694.1655
55.5332
17.3541
767.0528
Thu Dec 22 2011 19:00:00 GMT-0500 (Eastern Standard Time)
10
4
4
250
1602
5
Tue Dec 13 2011 19:00:00 GMT-0500 (Eastern Standard Time)
Thu Dec 22 2011 19:00:00 GMT-0500 (Eastern Standard Time)
1796.0355
143.6828
44.9009
1984.6192
Thu Dec 22 2011 19:00:00 GMT-0500 (Eastern Standard Time)

Purchasing.ShipMethod

//
Shipping company lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Check Constraints

Sample Data

ShipMethodID
Name
ShipBase
ShipRate
rowguid
ModifiedDate
1
XRQ - TRUCK GROUND
3.95
0.99
6BE756D9-D7BE-4463-8F2C-AE60C710D606
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
ZY - EXPRESS
9.95
1.99
3455079B-F773-4DC6-8F1E-2A58649C4AB8
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
OVERSEAS - DELUXE
29.95
2.99
22F4E461-28CF-4ACE-A980-F686CF112EC8
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
OVERNIGHT J-FAST
21.95
1.29
107E8356-E7A8-463D-B60C-079FFF467F3F
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
CARGO TRANSPORT 5
8.99
1.49
B166019A-B134-4E76-B957-2B0490C610ED
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Purchasing.Vendor

//
Companies from whom Adventure Works Cycles purchases parts or other goods.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
AccountNumber
Name
CreditRating
PreferredVendorStatus
ActiveFlag
PurchasingWebServiceURL
ModifiedDate
1492
AUSTRALI0001
Australia Bike Retailer
1
true
true
null
Thu Dec 22 2011 19:00:00 GMT-0500 (Eastern Standard Time)
1494
ALLENSON0001
Allenson Cycles
2
true
true
null
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1496
ADVANCED0001
Advanced Bicycles
1
true
true
null
Sun Apr 24 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1498
TRIKES0001
Trikes, Inc.
2
true
true
null
Thu Feb 02 2012 19:00:00 GMT-0500 (Eastern Standard Time)
1500
MORGANB0001
Morgan Bike Accessories
1
true
true
null
Wed Feb 01 2012 19:00:00 GMT-0500 (Eastern Standard Time)
1502
CYCLING0001
Cycling Master
1
true
true
null
Fri Dec 23 2011 19:00:00 GMT-0500 (Eastern Standard Time)
1504
CHICAGO0002
Chicago Rent-All
2
true
true
null
Fri Dec 23 2011 19:00:00 GMT-0500 (Eastern Standard Time)
1506
GREENWOO0001
Greenwood Athletic Company
1
true
true
null
Tue Jan 24 2012 19:00:00 GMT-0500 (Eastern Standard Time)
1508
COMPETE0001
Compete Enterprises, Inc
1
true
true
null
Fri Dec 23 2011 19:00:00 GMT-0500 (Eastern Standard Time)
1510
INTERNAT0001
International
1
true
true
null
Tue Jan 24 2012 19:00:00 GMT-0500 (Eastern Standard Time)

Sales.CountryRegionCurrency

//
Cross-reference table mapping ISO currency codes to a country or region.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

CountryRegionCode
CurrencyCode
ModifiedDate
AE
AED
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
AR
ARS
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
AT
ATS
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
AT
EUR
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AU
AUD
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
BB
BBD
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
BD
BDT
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
BE
BEF
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)
BE
EUR
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
BG
BGN
Sat Feb 08 2014 05:17:21 GMT-0500 (Eastern Standard Time)

Sales.CreditCard

//
Customer credit card information.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

CreditCardID
CardType
CardNumber
ExpMonth
ExpYear
ModifiedDate
1
SuperiorCard
33332664695310
11
2006
Sun Jul 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Distinguish
55552127249722
8
2005
Wed Dec 04 2013 19:00:00 GMT-0500 (Eastern Standard Time)
3
ColonialVoice
77778344838353
7
2005
Mon Jan 13 2014 19:00:00 GMT-0500 (Eastern Standard Time)
4
ColonialVoice
77774915718248
7
2006
Sun May 19 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Vista
11114404600042
4
2005
Thu Jan 31 2013 19:00:00 GMT-0500 (Eastern Standard Time)
6
Distinguish
55557132036181
9
2006
Wed Apr 09 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Distinguish
55553635401028
6
2007
Thu Jan 31 2013 19:00:00 GMT-0500 (Eastern Standard Time)
8
SuperiorCard
33336081193101
7
2007
Sat Jun 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Distinguish
55553465625901
2
2005
Sun Sep 22 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
10
SuperiorCard
33332126386493
8
2008
Tue Aug 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.Currency

//
Lookup table containing standard ISO currencies.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:38 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

CurrencyCode
Name
ModifiedDate
AED
Emirati Dirham
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AFA
Afghani
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
ALL
Lek
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AMD
Armenian Dram
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
ANG
Netherlands Antillian Guilder
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AOA
Kwanza
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
ARS
Argentine Peso
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
ATS
Shilling
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AUD
Australian Dollar
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
AWG
Aruban Guilder
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.CurrencyRate

//
Currency exchange rates.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

CurrencyRateID
CurrencyRateDate
FromCurrencyCode
ToCurrencyCode
AverageRate
EndOfDayRate
ModifiedDate
1
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
ARS
1
1.0002
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
AUD
1.5491
1.55
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
BRL
1.9379
1.9419
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
CAD
1.4641
1.4683
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
CNY
8.2781
8.2784
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
DEM
1.8967
1.8976
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
EUR
0.9697
0.9703
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
FRF
6.3611
6.3613
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
GBP
0.6183
0.6183
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
USD
JPY
104.91
104.958
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.Customer

//
Current customer information. Also see the Person and Store tables.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

CustomerID
PersonID
StoreID
TerritoryID
AccountNumber
rowguid
ModifiedDate
1
null
934
1
AW00000001
3F5AE95E-B87D-4AED-95B4-C3797AFCB74F
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
2
null
1028
1
AW00000002
E552F657-A9AF-4A7D-A645-C429D6E02491
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
3
null
642
4
AW00000003
130774B1-DB21-4EF3-98C8-C104BCD6ED6D
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
4
null
932
4
AW00000004
FF862851-1DAA-4044-BE7C-3E85583C054D
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
5
null
1026
4
AW00000005
83905BDC-6F5E-4F71-B162-C98DA069F38A
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
6
null
644
4
AW00000006
1A92DF88-BFA2-467D-BD54-FCB9E647FDD7
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
7
null
930
1
AW00000007
03E9273E-B193-448E-9823-FE0C44AEED78
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
8
null
1024
5
AW00000008
801368B1-4323-4BFA-8BEA-5B5B1E4BD4A0
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
9
null
620
5
AW00000009
B900BB7F-23C3-481D-80DA-C49A5BD6F772
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
10
null
928
6
AW00000010
CDB6698D-2FF1-4FBA-8F22-60AD1D11DABD
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)

Sales.PersonCreditCard

//
Cross-reference table mapping people to their credit card information in the CreditCard table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
CreditCardID
ModifiedDate
293
17038
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
295
15369
Sun Jul 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
297
8010
Sun Jul 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
299
5316
Tue Jul 30 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
301
6653
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
303
9010
Mon Jul 30 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
305
8937
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
307
16124
Mon Oct 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
309
9478
Thu Jun 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
311
17600
Sun Jul 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesOrderDetail

//
Individual products associated with a specific sales order. See SalesOrderHeader.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

SalesOrderID
SalesOrderDetailID
CarrierTrackingNumber
OrderQty
ProductID
SpecialOfferID
UnitPrice
UnitPriceDiscount
LineTotal
rowguid
ModifiedDate
43659
1
4911-403C-98
1
776
1
2024.994
0
2024.994
B207C96D-D9E6-402B-8470-2CC176C42283
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
2
4911-403C-98
3
777
1
2024.994
0
6074.982
7ABB600D-1E77-41BE-9FE5-B9142CFC08FA
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
3
4911-403C-98
1
778
1
2024.994
0
2024.994
475CF8C6-49F6-486E-B0AD-AFC6A50CDD2F
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
4
4911-403C-98
1
771
1
2039.994
0
2039.994
04C4DE91-5815-45D6-8670-F462719FBCE3
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
5
4911-403C-98
1
772
1
2039.994
0
2039.994
5A74C7D2-E641-438E-A7AC-37BF23280301
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
6
4911-403C-98
2
773
1
2039.994
0
4079.988
CE472532-A4C0-45BA-816E-EEFD3FD848B3
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
7
4911-403C-98
1
774
1
2039.994
0
2039.994
80667840-F962-4EE3-96E0-AECA108E0D4F
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
8
4911-403C-98
3
714
1
28.8404
0
86.5212
E9D54907-E7B7-4969-80D9-76BA69F8A836
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
9
4911-403C-98
1
716
1
28.8404
0
28.8404
AA542630-BDCD-4CE5-89A0-C1BF82747725
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43659
10
4911-403C-98
6
709
1
5.7
0
34.2
AC769034-3C2F-495C-A5A7-3B71CDB25D4E
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesOrderHeader

//
General sales order information.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

SalesOrderID
RevisionNumber
OrderDate
DueDate
ShipDate
Status
OnlineOrderFlag
SalesOrderNumber
PurchaseOrderNumber
AccountNumber
CustomerID
SalesPersonID
TerritoryID
BillToAddressID
ShipToAddressID
ShipMethodID
CreditCardID
CreditCardApprovalCode
CurrencyRateID
SubTotal
TaxAmt
Freight
TotalDue
Comment
rowguid
ModifiedDate
43659
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43659
PO522145787
10-4020-000676
29825
279
5
985
985
5
16281
105041Vi84182
null
20565.6206
1971.5149
616.0984
23153.2339
null
79B65321-39CA-4115-9CBA-8FE0903E12E6
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43660
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43660
PO18850127500
10-4020-000117
29672
279
5
921
921
5
5618
115213Vi29411
null
1294.2529
124.2483
38.8276
1457.3288
null
738DC42D-D03B-48A1-9822-F95A67EA7389
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43661
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43661
PO18473189620
10-4020-000442
29734
282
6
517
517
5
1346
85274Vi6854
4
32726.4786
3153.7696
985.553
36865.8012
null
D91B9131-18A4-4A11-BC3A-90B6F53E9D74
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43662
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43662
PO18444174044
10-4020-000227
29994
282
6
482
482
5
10456
125295Vi53935
4
28832.5289
2775.1646
867.2389
32474.9324
null
4A1ECFC0-CC3A-4740-B028-1C50BB48711C
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43663
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43663
PO18009186470
10-4020-000510
29565
276
4
1073
1073
5
4322
45303Vi22691
null
419.4589
40.2681
12.5838
472.3108
null
9B1E7A40-6AE0-4AD3-811C-A64951857C4B
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43664
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43664
PO16617121983
10-4020-000397
29898
280
1
876
876
5
806
95555Vi4081
null
24432.6088
2344.9921
732.81
27510.4109
null
22A8A5DA-8C22-42AD-9241-839489B6EF0D
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43665
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43665
PO16588191572
10-4020-000146
29580
283
1
849
849
5
15232
35568Vi78804
null
14352.7713
1375.9427
429.9821
16158.6961
null
5602C304-853C-43D7-9E79-76E320D476CF
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43666
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43666
PO16008173883
10-4020-000511
30052
276
4
1074
1074
5
13349
105623Vi69217
null
5056.4896
486.3747
151.9921
5694.8564
null
E2A90057-1366-4487-8A7E-8085845FF770
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43667
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43667
PO15428132599
10-4020-000646
29974
277
3
629
629
5
10370
55680Vi53503
null
6107.082
586.1203
183.1626
6876.3649
null
86D5237D-432D-4B21-8ABC-671942F5789D
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43668
8
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Jun 11 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
false
SO43668
PO14732180295
10-4020-000514
29614
282
6
529
529
5
1566
85817Vi8045
4
35944.1562
3461.7654
1081.8017
40487.7233
null
281CC355-D538-494E-9B44-461B36A826C6
Mon Jun 06 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesOrderHeaderSalesReason

//
Cross-reference table mapping sales orders to sales reason codes.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

SalesOrderID
SalesReasonID
ModifiedDate
43697
5
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43697
9
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43702
5
Tue May 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43702
9
Tue May 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43703
5
Tue May 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43703
9
Tue May 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43706
5
Wed Jun 01 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43706
9
Wed Jun 01 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43707
5
Wed Jun 01 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
43707
9
Wed Jun 01 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesPerson

//
Sales representative current information.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
TerritoryID
SalesQuota
Bonus
CommissionPct
SalesYTD
SalesLastYear
rowguid
ModifiedDate
274
null
null
0
0
559697.5639
0
48754992-9EE0-4C0E-8C94-9451604E3E02
Mon Dec 27 2010 19:00:00 GMT-0500 (Eastern Standard Time)
275
2
300000
4100
0.012
3763178.1787
1750406.4785
1E0A7274-3064-4F58-88EE-4C6586C87169
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
276
4
250000
2000
0.015
4251368.5497
1439156.0291
4DD9EEE4-8E81-4F8C-AF97-683394C1F7C0
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
277
3
250000
2500
0.015
3189418.3662
1997186.2037
39012928-BFEC-4242-874D-423162C3F567
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
278
6
250000
500
0.01
1453719.4653
1620276.8966
7A0AE1AB-B283-40F9-91D1-167ABF06D720
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
279
5
300000
6700
0.01
2315185.611
1849640.9418
52A5179D-3239-4157-AE29-17E868296DC0
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
280
1
250000
5000
0.01
1352577.1325
1927059.178
BE941A4A-FB50-4947-BDA4-BB8972365B08
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
281
4
250000
3550
0.01
2458535.6169
2073505.9999
35326DDB-7278-4FEF-B3BA-EA137B69094E
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
282
6
250000
5000
0.015
2604540.7172
2038234.6549
31FD7FC1-DC84-4F05-B9A0-762519EACACC
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
283
1
250000
3500
0.012
1573012.9383
1371635.3158
6BAC15B2-8FFB-45A9-B6D5-040E16C2073F
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesPersonQuotaHistory

//
Sales performance tracking.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
QuotaDate
SalesQuota
rowguid
ModifiedDate
274
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
28000
99109BBF-8693-4587-BC23-6036EC89E1BE
Fri Apr 15 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Tue Aug 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7000
DFD01444-8900-461C-8D6F-04598DAE01D4
Sat Jul 16 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Wed Nov 30 2011 19:00:00 GMT-0500 (Eastern Standard Time)
91000
0A69F453-9689-4CCF-A08C-C644670F5668
Sun Oct 16 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Tue Feb 28 2012 19:00:00 GMT-0500 (Eastern Standard Time)
140000
DA8D1458-5FB9-4C3E-9EAD-8F5CE1393047
Sat Jan 14 2012 19:00:00 GMT-0500 (Eastern Standard Time)
274
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
70000
760CEF84-B980-417B-A667-7358C38857F0
Sat Apr 14 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Wed Aug 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
154000
FB29E024-F26A-49AA-A7CC-C99AE7BA4853
Sun Jul 15 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Thu Nov 29 2012 19:00:00 GMT-0500 (Eastern Standard Time)
107000
13947D2C-A254-47C9-8817-CBD186FFA526
Mon Oct 15 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Wed Feb 27 2013 19:00:00 GMT-0500 (Eastern Standard Time)
58000
BC1A222F-47A0-48D1-9C56-AC873269DC98
Sun Jan 13 2013 19:00:00 GMT-0500 (Eastern Standard Time)
274
Wed May 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
263000
8B4E3CBF-F0EF-49C5-9A8C-87679055057E
Sun Apr 14 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
274
Thu Aug 29 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
116000
E9DE95E3-B119-4441-BD1D-B27FC4516022
Mon Jul 15 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesReason

//
Lookup table of customer purchase reasons.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Sample Data

SalesReasonID
Name
ReasonType
ModifiedDate
1
Price
Other
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
On Promotion
Promotion
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Magazine Advertisement
Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Television Advertisement
Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Manufacturer
Other
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Review
Other
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Demo Event
Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Sponsorship
Marketing
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Quality
Other
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Other
Other
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesTaxRate

//
Tax rate lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

SalesTaxRateID
StateProvinceID
TaxType
TaxRate
Name
rowguid
ModifiedDate
1
1
1
14
Canadian GST + Alberta Provincial Tax
683DE5DD-521A-47D4-A573-06A3CDB1BC5D
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
57
1
14.25
Canadian GST + Ontario Provincial Tax
05C4FFDB-4F84-4CDF-ABE5-FDF3216EA74E
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
63
1
14.25
Canadian GST + Quebec Provincial Tax
D4EDB557-56D7-403C-B538-4DF5E7302588
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
1
2
7
Canadian GST
F0D76907-B433-453F-B95E-16FCE73B807A
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
57
2
7
Canadian GST
7E0E97A2-878B-476F-A648-05A3DD4450ED
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
63
2
7
Canadian GST
1E285D2C-8AF7-47AA-B06A-762CF4D93ACD
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
7
3
7
Canadian GST
590CCB14-CB20-49BF-8FEE-E0C3ABC4C2B1
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
29
3
7
Canadian GST
A8365F30-78B7-4DBE-8985-F8260560126B
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
31
3
7
Canadian GST
F4FDE24B-7A53-4340-9D10-173E9424864A
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
41
3
7
Canadian GST
383D465B-E1D1-492A-83F3-AB3E9CBF3282
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesTerritory

//
Sales territory lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

TerritoryID
Name
CountryRegionCode
Group
SalesYTD
SalesLastYear
CostYTD
CostLastYear
rowguid
ModifiedDate
1
Northwest
US
North America
7887186.7882
3298694.4938
0
0
43689A10-E30B-497F-B0DE-11DE20267FF7
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Northeast
US
North America
2402176.8476
3607148.9371
0
0
00FB7309-96CC-49E2-8363-0A1BA72486F2
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Central
US
North America
3072175.118
3205014.0767
0
0
DF6E7FD8-1A8D-468C-B103-ED8ADDB452C1
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Southwest
US
North America
10510853.8739
5366575.7098
0
0
DC3E9EA0-7950-4431-9428-99DBCBC33865
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Southeast
US
North America
2538667.2515
3925071.4318
0
0
6DC4165A-5E4C-42D2-809D-4344E0AC75E7
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Canada
CA
North America
6771829.1376
5693988.86
0
0
06B4AF8A-1639-476E-9266-110461D66B00
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
7
France
FR
Europe
4772398.3078
2396539.7601
0
0
BF806804-9B4C-4B07-9D19-706F2E689552
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Germany
DE
Europe
3805202.3478
1307949.7917
0
0
6D2450DB-8159-414F-A917-E73EE91C38A9
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Australia
AU
Pacific
5977814.9154
2278548.9776
0
0
602E612E-DFE9-41D9-B894-27E489747885
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)
10
United Kingdom
GB
Europe
5012905.3656
1635823.3967
0
0
05FC7E1F-2DEA-414E-9ECD-09D150516FB5
Tue Apr 29 2008 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SalesTerritoryHistory

//
Sales representative transfers to other sales territories.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

BusinessEntityID
TerritoryID
StartDate
EndDate
rowguid
ModifiedDate
275
2
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Wed Nov 28 2012 19:00:00 GMT-0500 (Eastern Standard Time)
8563CE6A-00FF-47D7-BA4D-3C3E1CDEF531
Wed Nov 21 2012 19:00:00 GMT-0500 (Eastern Standard Time)
275
3
Thu Nov 29 2012 19:00:00 GMT-0500 (Eastern Standard Time)
null
2F44304C-EE87-4C72-813E-CA75C5F61F4C
Thu Nov 22 2012 19:00:00 GMT-0500 (Eastern Standard Time)
276
4
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
64BCB1B3-A793-40BA-9859-D90F78C3F167
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
277
3
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Wed Nov 28 2012 19:00:00 GMT-0500 (Eastern Standard Time)
3E9F893D-5142-46C9-A76A-867D1E3D6F90
Wed Nov 21 2012 19:00:00 GMT-0500 (Eastern Standard Time)
277
2
Thu Nov 29 2012 19:00:00 GMT-0500 (Eastern Standard Time)
null
132E4721-32DD-4A73-B556-1837F3A2B9AE
Thu Nov 22 2012 19:00:00 GMT-0500 (Eastern Standard Time)
278
6
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
B7C8F9F5-5FB8-47B3-BE73-1B9A14BDF8B9
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
279
5
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
57D1CDCF-62CE-499F-8BE8-1BB71C4BB7EF
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
280
1
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Fri Sep 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
FD3F5566-10E2-4960-BE12-0365E5665881
Fri Sep 21 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
281
4
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
null
9D8754B2-C320-40DB-A77F-FF5A1BC0F46B
Mon May 23 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
282
6
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
2C9F5240-D8BF-4F85-897D-6083146DBC4B
Mon May 21 2012 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.ShoppingCartItem

//
Contains online customer orders until the order is submitted or cancelled.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Check Constraints

Sample Data

ShoppingCartItemID
ShoppingCartID
Quantity
ProductID
DateCreated
ModifiedDate
2
14951
3
862
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)
4
20621
4
881
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)
5
20621
7
874
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)
Sat Nov 09 2013 12:54:07 GMT-0500 (Eastern Standard Time)

Sales.SpecialOffer

//
Sale discounts lookup table.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Check Constraints

Sample Data

SpecialOfferID
Description
DiscountPct
Type
Category
StartDate
EndDate
MinQty
MaxQty
rowguid
ModifiedDate
1
No Discount
0
No Discount
No Discount
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Sat Nov 29 2014 19:00:00 GMT-0500 (Eastern Standard Time)
0
null
0290C4F5-191F-4337-AB6B-0A2DDE03CBF9
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
2
Volume Discount 11 to 14
0.02
Volume Discount
Reseller
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
11
14
D7542EE7-15DB-4541-985C-5CC27AEF26D6
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
3
Volume Discount 15 to 24
0.05
Volume Discount
Reseller
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
15
24
4BDBCC01-8CF7-40A9-B643-40EC5B717491
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
4
Volume Discount 25 to 40
0.1
Volume Discount
Reseller
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
25
40
504B5E85-8F3F-4EBC-9E1D-C1BC5DEA9AA8
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
5
Volume Discount 41 to 60
0.15
Volume Discount
Reseller
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
41
60
677E1D9D-944F-4E81-90E8-47EB0A82D48C
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
6
Volume Discount over 60
0.2
Volume Discount
Reseller
Mon May 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu May 29 2014 20:00:00 GMT-0400 (Eastern Daylight Time)
61
null
8157F569-4E8D-46B6-9347-5D0F726A9439
Sat Apr 30 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
7
Mountain-100 Clearance Sale
0.35
Discontinued Product
Reseller
Thu Apr 12 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Mon May 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
0
null
7DF15BF5-6C05-47E7-80A4-22BD1CE59A72
Tue Mar 13 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
8
Sport Helmet Discount-2002
0.1
Seasonal Discount
Reseller
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Thu Jun 28 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
0
null
20C5D2CC-A38F-48F8-AC9A-8F15943E52AE
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
9
Road-650 Overstock
0.3
Excess Inventory
Reseller
Tue May 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jul 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
0
null
0CF8472B-F9E6-4945-9E09-549D7DDE2198
Sun Apr 29 2012 20:00:00 GMT-0400 (Eastern Daylight Time)
10
Mountain Tire Sale
0.5
Excess Inventory
Customer
Mon May 13 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
Sun Jul 28 2013 20:00:00 GMT-0400 (Eastern Daylight Time)
0
null
220444AD-2EF3-4E4C-87E9-3AA6EE39A877
Sat Apr 13 2013 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.SpecialOfferProduct

//
Cross-reference table mapping products to special offer discounts.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

SpecialOfferID
ProductID
rowguid
ModifiedDate
1
680
BB30B868-D86C-4557-8DB2-4B2D0A83A0FB
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
706
B3C9A4B1-2AE6-4CBA-B552-1F206C9F4C1F
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
707
27B711FE-0B77-4EA4-AD1A-7C239956BEF4
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
708
46CBB78B-246E-4D69-9BD6-E521277C1078
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
709
CF102AA0-055F-4D2B-8B98-04B161758EA8
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
710
63718DA1-464B-4325-9514-CDEE46CB124F
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
711
457EB971-D1C9-48CA-B947-AE7E1B114377
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
712
5B948448-BAE5-4F2A-A1F3-8203E892FD24
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
713
07768F40-6E46-430F-AC1A-FF6A3629729C
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)
1
714
85004BCE-C74A-4D4E-8D17-3157991A1400
Thu Mar 31 2011 20:00:00 GMT-0400 (Eastern Daylight Time)

Sales.Store

//
Customers (resellers) of Adventure Works products.

Created: Thu Jul 17 2014 12:11:15 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Columns

Indexes

Foreign Keys

Sample Data

BusinessEntityID
Name
SalesPersonID
Demographics
rowguid
ModifiedDate
292
Next-Door Bike Store
279
[xml]
A22517E3-848D-4EBE-B9D9-7437F3432304
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
294
Professional Sales and Service
276
[xml]
B50CA50B-C601-4A13-B07E-2C63862D71B4
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
296
Riders Company
277
[xml]
337C3688-1339-4E1A-A08A-B54B23566E49
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
298
The Bike Mechanics
275
[xml]
7894F278-F0C8-4D16-BD75-213FDBF13023
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
300
Nationwide Supply
286
[xml]
C3FC9705-A8C4-4F3A-9550-EB2FA4B7B64D
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
302
Area Bike Accessories
281
[xml]
368BE6DD-30E5-49BB-9A86-71FD49C58F4E
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
304
Bicycle Accessories and Kits
283
[xml]
35F40636-5105-49D5-869E-27E231189150
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
306
Clamps & Brackets Co.
275
[xml]
64D06BFC-D060-405C-8C60-C067FE7C67DF
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
308
Valley Bicycle Specialists
277
[xml]
59386B0C-652E-4668-B44B-4E1711793330
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)
310
New Bikes Company
279
[xml]
47E4B6BD-5CD1-45A3-A231-79D930381C56
Fri Sep 12 2014 07:15:07 GMT-0400 (Eastern Daylight Time)

Views

HumanResources.vEmployee HumanResources.vEmployeeDepartment HumanResources.vEmployeeDepartmentHistory HumanResources.vJobCandidate HumanResources.vJobCandidateEducation HumanResources.vJobCandidateEmployment Person.vAdditionalContactInfo Person.vStateProvinceCountryRegion Person.vStateProvinceCountryRegion Production.vProductAndDescription Production.vProductAndDescription Production.vProductModelCatalogDescription Production.vProductModelInstructions Purchasing.vVendorWithAddresses Purchasing.vVendorWithContacts Sales.vIndividualCustomer Sales.vPersonDemographics Sales.vSalesPerson Sales.vSalesPersonSalesByFiscalYears Sales.vStoreWithAddresses Sales.vStoreWithContacts Sales.vStoreWithDemographics

HumanResources.vEmployee

//
Employee names and addresses.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vEmployee] 
AS 
SELECT 
    e.[BusinessEntityID]
    ,p.[Title]
    ,p.[FirstName]
    ,p.[MiddleName]
    ,p.[LastName]
    ,p.[Suffix]
    ,e.[JobTitle]  
    ,pp.[PhoneNumber]
    ,pnt.[Name] AS [PhoneNumberType]
    ,ea.[EmailAddress]
    ,p.[EmailPromotion]
    ,a.[AddressLine1]
    ,a.[AddressLine2]
    ,a.[City]
    ,sp.[Name] AS [StateProvinceName] 
    ,a.[PostalCode]
    ,cr.[Name] AS [CountryRegionName] 
    ,p.[AdditionalContactInfo]
FROM [HumanResources].[Employee] e
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = e.[BusinessEntityID]
    INNER JOIN [Person].[BusinessEntityAddress] bea 
    ON bea.[BusinessEntityID] = e.[BusinessEntityID] 
    INNER JOIN [Person].[Address] a 
    ON a.[AddressID] = bea.[AddressID]
    INNER JOIN [Person].[StateProvince] sp 
    ON sp.[StateProvinceID] = a.[StateProvinceID]
    INNER JOIN [Person].[CountryRegion] cr 
    ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
    LEFT OUTER JOIN [Person].[PersonPhone] pp
    ON pp.BusinessEntityID = p.[BusinessEntityID]
    LEFT OUTER JOIN [Person].[PhoneNumberType] pnt
    ON pp.[PhoneNumberTypeID] = pnt.[PhoneNumberTypeID]
    LEFT OUTER JOIN [Person].[EmailAddress] ea
    ON p.[BusinessEntityID] = ea.[BusinessEntityID];

	

HumanResources.vEmployeeDepartment

//
Returns employee name, title, and current department.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vEmployeeDepartment] 
AS 
SELECT 
    e.[BusinessEntityID] 
    ,p.[Title] 
    ,p.[FirstName] 
    ,p.[MiddleName] 
    ,p.[LastName] 
    ,p.[Suffix] 
    ,e.[JobTitle]
    ,d.[Name] AS [Department] 
    ,d.[GroupName] 
    ,edh.[StartDate] 
FROM [HumanResources].[Employee] e
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = e.[BusinessEntityID]
    INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh 
    ON e.[BusinessEntityID] = edh.[BusinessEntityID] 
    INNER JOIN [HumanResources].[Department] d 
    ON edh.[DepartmentID] = d.[DepartmentID] 
WHERE edh.EndDate IS NULL

	

HumanResources.vEmployeeDepartmentHistory

//
Returns employee name and current and previous departments.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vEmployeeDepartmentHistory] 
AS 
SELECT 
    e.[BusinessEntityID] 
    ,p.[Title] 
    ,p.[FirstName] 
    ,p.[MiddleName] 
    ,p.[LastName] 
    ,p.[Suffix] 
    ,s.[Name] AS [Shift]
    ,d.[Name] AS [Department] 
    ,d.[GroupName] 
    ,edh.[StartDate] 
    ,edh.[EndDate]
FROM [HumanResources].[Employee] e
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = e.[BusinessEntityID]
    INNER JOIN [HumanResources].[EmployeeDepartmentHistory] edh 
    ON e.[BusinessEntityID] = edh.[BusinessEntityID] 
    INNER JOIN [HumanResources].[Department] d 
    ON edh.[DepartmentID] = d.[DepartmentID] 
    INNER JOIN [HumanResources].[Shift] s
    ON s.[ShiftID] = edh.[ShiftID];

	

HumanResources.vJobCandidate

//
Job candidate names and resumes.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vJobCandidate] 
AS 
SELECT 
    jc.[JobCandidateID] 
    ,jc.[BusinessEntityID] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/Name/Name.Prefix)[1]', 'nvarchar(30)') AS [Name.Prefix] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume";
        (/Resume/Name/Name.First)[1]', 'nvarchar(30)') AS [Name.First] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/Name/Name.Middle)[1]', 'nvarchar(30)') AS [Name.Middle] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/Name/Name.Last)[1]', 'nvarchar(30)') AS [Name.Last] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/Name/Name.Suffix)[1]', 'nvarchar(30)') AS [Name.Suffix] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/Skills)[1]', 'nvarchar(max)') AS [Skills] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Address/Addr.Type)[1]', 'nvarchar(30)') AS [Addr.Type]
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Address/Addr.Location/Location/Loc.CountryRegion)[1]', 'nvarchar(100)') AS [Addr.Loc.CountryRegion]
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Address/Addr.Location/Location/Loc.State)[1]', 'nvarchar(100)') AS [Addr.Loc.State]
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Address/Addr.Location/Location/Loc.City)[1]', 'nvarchar(100)') AS [Addr.Loc.City]
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Address/Addr.PostalCode)[1]', 'nvarchar(20)') AS [Addr.PostalCode]
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/EMail)[1]', 'nvarchar(max)') AS [EMail] 
    ,[Resume].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (/Resume/WebSite)[1]', 'nvarchar(max)') AS [WebSite] 
    ,jc.[ModifiedDate] 
FROM [HumanResources].[JobCandidate] jc 
CROSS APPLY jc.[Resume].nodes(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
    /Resume') AS Resume(ref);

	

HumanResources.vJobCandidateEducation

//
Displays the content from each education related element in the xml column Resume in the HumanResources.JobCandidate table. The content has been localized into French, Simplified Chinese and Thai. Some data may not display correctly unless supplemental language support is installed.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vJobCandidateEducation] 
AS 
SELECT 
    jc.[JobCandidateID] 
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Level)[1]', 'nvarchar(max)') AS [Edu.Level]
    ,CONVERT(datetime, REPLACE([Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.StartDate)[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [Edu.StartDate] 
    ,CONVERT(datetime, REPLACE([Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.EndDate)[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [Edu.EndDate] 
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Degree)[1]', 'nvarchar(50)') AS [Edu.Degree]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Major)[1]', 'nvarchar(50)') AS [Edu.Major]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Minor)[1]', 'nvarchar(50)') AS [Edu.Minor]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.GPA)[1]', 'nvarchar(5)') AS [Edu.GPA]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.GPAScale)[1]', 'nvarchar(5)') AS [Edu.GPAScale]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.School)[1]', 'nvarchar(100)') AS [Edu.School]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Location/Location/Loc.CountryRegion)[1]', 'nvarchar(100)') AS [Edu.Loc.CountryRegion]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Location/Location/Loc.State)[1]', 'nvarchar(100)') AS [Edu.Loc.State]
    ,[Education].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Edu.Location/Location/Loc.City)[1]', 'nvarchar(100)') AS [Edu.Loc.City]
FROM [HumanResources].[JobCandidate] jc 
CROSS APPLY jc.[Resume].nodes(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
    /Resume/Education') AS [Education](ref);

	

HumanResources.vJobCandidateEmployment

//
Displays the content from each employement history related element in the xml column Resume in the HumanResources.JobCandidate table. The content has been localized into French, Simplified Chinese and Thai. Some data may not display correctly unless supplemental language support is installed.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [HumanResources].[vJobCandidateEmployment] 
AS 
SELECT 
    jc.[JobCandidateID] 
    ,CONVERT(datetime, REPLACE([Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.StartDate)[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [Emp.StartDate] 
    ,CONVERT(datetime, REPLACE([Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.EndDate)[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [Emp.EndDate] 
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.OrgName)[1]', 'nvarchar(100)') AS [Emp.OrgName]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.JobTitle)[1]', 'nvarchar(100)') AS [Emp.JobTitle]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.Responsibility)[1]', 'nvarchar(max)') AS [Emp.Responsibility]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.FunctionCategory)[1]', 'nvarchar(max)') AS [Emp.FunctionCategory]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.IndustryCategory)[1]', 'nvarchar(max)') AS [Emp.IndustryCategory]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.Location/Location/Loc.CountryRegion)[1]', 'nvarchar(max)') AS [Emp.Loc.CountryRegion]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.Location/Location/Loc.State)[1]', 'nvarchar(max)') AS [Emp.Loc.State]
    ,[Employment].ref.value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
        (Emp.Location/Location/Loc.City)[1]', 'nvarchar(max)') AS [Emp.Loc.City]
FROM [HumanResources].[JobCandidate] jc 
CROSS APPLY jc.[Resume].nodes(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume"; 
    /Resume/Employment') AS Employment(ref);

	

Person.vAdditionalContactInfo

//
Displays the contact name and content from each element in the xml column AdditionalContactInfo for that person.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Person].[vAdditionalContactInfo] 
AS 
SELECT 
    [BusinessEntityID] 
    ,[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"; 
        (act:telephoneNumber)[1]/act:number', 'nvarchar(50)') AS [TelephoneNumber] 
    ,LTRIM(RTRIM([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"; 
        (act:telephoneNumber/act:SpecialInstructions/text())[1]', 'nvarchar(max)'))) AS [TelephoneSpecialInstructions] 
    ,[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";
        (act:homePostalAddress/act:Street)[1]', 'nvarchar(50)') AS [Street] 
    ,[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"; 
        (act:homePostalAddress/act:City)[1]', 'nvarchar(50)') AS [City] 
    ,[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"; 
        (act:homePostalAddress/act:StateProvince)[1]', 'nvarchar(50)') AS [StateProvince] 
    ,[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"; 
        (act:homePostalAddress/act:PostalCode)[1]', 'nvarchar(50)') AS [PostalCode] 
    ,[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"; 
        (act:homePostalAddress/act:CountryRegion)[1]', 'nvarchar(50)') AS [CountryRegion] 
    ,[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"; 
        (act:homePostalAddress/act:SpecialInstructions/text())[1]', 'nvarchar(max)') AS [HomeAddressSpecialInstructions] 
    ,[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"; 
        (act:eMail/act:eMailAddress)[1]', 'nvarchar(128)') AS [EMailAddress] 
    ,LTRIM(RTRIM([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"; 
        (act:eMail/act:SpecialInstructions/text())[1]', 'nvarchar(max)'))) AS [EMailSpecialInstructions] 
    ,[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"; 
        (act:eMail/act:SpecialInstructions/act:telephoneNumber/act:number)[1]', 'nvarchar(50)') AS [EMailTelephoneNumber] 
    ,[rowguid] 
    ,[ModifiedDate]
FROM [Person].[Person]
OUTER APPLY [AdditionalContactInfo].nodes(
    'declare namespace ci="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo"; 
    /ci:AdditionalContactInfo') AS ContactInfo(ref) 
WHERE [AdditionalContactInfo] IS NOT NULL;

	

Person.vStateProvinceCountryRegion

//
Clustered index on the view vStateProvinceCountryRegion.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


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] cr 
    ON sp.[CountryRegionCode] = cr.[CountryRegionCode];

	

Person.vStateProvinceCountryRegion

//
Joins StateProvince table with CountryRegion table.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


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] cr 
    ON sp.[CountryRegionCode] = cr.[CountryRegionCode];

	

Production.vProductAndDescription

//
Product names and descriptions. Product descriptions are provided in multiple languages.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Production].[vProductAndDescription] 
WITH SCHEMABINDING 
AS 
-- View (indexed or standard) to display products and product descriptions by language.
SELECT 
    p.[ProductID] 
    ,p.[Name] 
    ,pm.[Name] AS [ProductModel] 
    ,pmx.[CultureID] 
    ,pd.[Description] 
FROM [Production].[Product] p 
    INNER JOIN [Production].[ProductModel] pm 
    ON p.[ProductModelID] = pm.[ProductModelID] 
    INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx 
    ON pm.[ProductModelID] = pmx.[ProductModelID] 
    INNER JOIN [Production].[ProductDescription] pd 
    ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];

	

Production.vProductAndDescription

//
Clustered index on the view vProductAndDescription.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Production].[vProductAndDescription] 
WITH SCHEMABINDING 
AS 
-- View (indexed or standard) to display products and product descriptions by language.
SELECT 
    p.[ProductID] 
    ,p.[Name] 
    ,pm.[Name] AS [ProductModel] 
    ,pmx.[CultureID] 
    ,pd.[Description] 
FROM [Production].[Product] p 
    INNER JOIN [Production].[ProductModel] pm 
    ON p.[ProductModelID] = pm.[ProductModelID] 
    INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx 
    ON pm.[ProductModelID] = pmx.[ProductModelID] 
    INNER JOIN [Production].[ProductDescription] pd 
    ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];

	

Production.vProductModelCatalogDescription

//
Displays the content from each element in the xml column CatalogDescription for each product in the Production.ProductModel table that has catalog data.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Production].[vProductModelCatalogDescription] 
AS 
SELECT 
    [ProductModelID] 
    ,[Name] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace html="http://www.w3.org/1999/xhtml"; 
        (/p1:ProductDescription/p1:Summary/html:p)[1]', 'nvarchar(max)') AS [Summary] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Manufacturer/p1:Name)[1]', 'nvarchar(max)') AS [Manufacturer] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Manufacturer/p1:Copyright)[1]', 'nvarchar(30)') AS [Copyright] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Manufacturer/p1:ProductURL)[1]', 'nvarchar(256)') AS [ProductURL] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain"; 
        (/p1:ProductDescription/p1:Features/wm:Warranty/wm:WarrantyPeriod)[1]', 'nvarchar(256)') AS [WarrantyPeriod] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain"; 
        (/p1:ProductDescription/p1:Features/wm:Warranty/wm:Description)[1]', 'nvarchar(256)') AS [WarrantyDescription] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain"; 
        (/p1:ProductDescription/p1:Features/wm:Maintenance/wm:NoOfYears)[1]', 'nvarchar(256)') AS [NoOfYears] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wm="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain"; 
        (/p1:ProductDescription/p1:Features/wm:Maintenance/wm:Description)[1]', 'nvarchar(256)') AS [MaintenanceDescription] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wf="http://www.adventure-works.com/schemas/OtherFeatures"; 
        (/p1:ProductDescription/p1:Features/wf:wheel)[1]', 'nvarchar(256)') AS [Wheel] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wf="http://www.adventure-works.com/schemas/OtherFeatures"; 
        (/p1:ProductDescription/p1:Features/wf:saddle)[1]', 'nvarchar(256)') AS [Saddle] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wf="http://www.adventure-works.com/schemas/OtherFeatures"; 
        (/p1:ProductDescription/p1:Features/wf:pedal)[1]', 'nvarchar(256)') AS [Pedal] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wf="http://www.adventure-works.com/schemas/OtherFeatures"; 
        (/p1:ProductDescription/p1:Features/wf:BikeFrame)[1]', 'nvarchar(max)') AS [BikeFrame] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        declare namespace wf="http://www.adventure-works.com/schemas/OtherFeatures"; 
        (/p1:ProductDescription/p1:Features/wf:crankset)[1]', 'nvarchar(256)') AS [Crankset] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Picture/p1:Angle)[1]', 'nvarchar(256)') AS [PictureAngle] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Picture/p1:Size)[1]', 'nvarchar(256)') AS [PictureSize] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Picture/p1:ProductPhotoID)[1]', 'nvarchar(256)') AS [ProductPhotoID] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Specifications/Material)[1]', 'nvarchar(256)') AS [Material] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Specifications/Color)[1]', 'nvarchar(256)') AS [Color] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Specifications/ProductLine)[1]', 'nvarchar(256)') AS [ProductLine] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Specifications/Style)[1]', 'nvarchar(256)') AS [Style] 
    ,[CatalogDescription].value(N'declare namespace p1="http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription"; 
        (/p1:ProductDescription/p1:Specifications/RiderExperience)[1]', 'nvarchar(1024)') AS [RiderExperience] 
    ,[rowguid] 
    ,[ModifiedDate]
FROM [Production].[ProductModel] 
WHERE [CatalogDescription] IS NOT NULL;

	

Production.vProductModelInstructions

//
Displays the content from each element in the xml column Instructions for each product in the Production.ProductModel table that has manufacturing instructions.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Production].[vProductModelInstructions] 
AS 
SELECT 
    [ProductModelID] 
    ,[Name] 
    ,[Instructions].value(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"; 
        (/root/text())[1]', 'nvarchar(max)') AS [Instructions] 
    ,[MfgInstructions].ref.value('@LocationID[1]', 'int') AS [LocationID] 
    ,[MfgInstructions].ref.value('@SetupHours[1]', 'decimal(9, 4)') AS [SetupHours] 
    ,[MfgInstructions].ref.value('@MachineHours[1]', 'decimal(9, 4)') AS [MachineHours] 
    ,[MfgInstructions].ref.value('@LaborHours[1]', 'decimal(9, 4)') AS [LaborHours] 
    ,[MfgInstructions].ref.value('@LotSize[1]', 'int') AS [LotSize] 
    ,[Steps].ref.value('string(.)[1]', 'nvarchar(1024)') AS [Step] 
    ,[rowguid] 
    ,[ModifiedDate]
FROM [Production].[ProductModel] 
CROSS APPLY [Instructions].nodes(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"; 
    /root/Location') MfgInstructions(ref)
CROSS APPLY [MfgInstructions].ref.nodes('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions"; 
    step') Steps(ref);

	

Purchasing.vVendorWithAddresses

//
Vendor (company) names and addresses .

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Purchasing].[vVendorWithAddresses] AS 
SELECT 
    v.[BusinessEntityID]
    ,v.[Name]
    ,at.[Name] AS [AddressType]
    ,a.[AddressLine1] 
    ,a.[AddressLine2] 
    ,a.[City] 
    ,sp.[Name] AS [StateProvinceName] 
    ,a.[PostalCode] 
    ,cr.[Name] AS [CountryRegionName] 
FROM [Purchasing].[Vendor] v
    INNER JOIN [Person].[BusinessEntityAddress] bea 
    ON bea.[BusinessEntityID] = v.[BusinessEntityID] 
    INNER JOIN [Person].[Address] a 
    ON a.[AddressID] = bea.[AddressID]
    INNER JOIN [Person].[StateProvince] sp 
    ON sp.[StateProvinceID] = a.[StateProvinceID]
    INNER JOIN [Person].[CountryRegion] cr 
    ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
    INNER JOIN [Person].[AddressType] at 
    ON at.[AddressTypeID] = bea.[AddressTypeID];

	

Purchasing.vVendorWithContacts

//
Vendor (company) names and the names of vendor employees to contact.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Purchasing].[vVendorWithContacts] AS 
SELECT 
    v.[BusinessEntityID]
    ,v.[Name]
    ,ct.[Name] AS [ContactType] 
    ,p.[Title] 
    ,p.[FirstName] 
    ,p.[MiddleName] 
    ,p.[LastName] 
    ,p.[Suffix] 
    ,pp.[PhoneNumber] 
	,pnt.[Name] AS [PhoneNumberType]
    ,ea.[EmailAddress] 
    ,p.[EmailPromotion] 
FROM [Purchasing].[Vendor] v
    INNER JOIN [Person].[BusinessEntityContact] bec 
    ON bec.[BusinessEntityID] = v.[BusinessEntityID]
	INNER JOIN [Person].ContactType ct
	ON ct.[ContactTypeID] = bec.[ContactTypeID]
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = bec.[PersonID]
	LEFT OUTER JOIN [Person].[EmailAddress] ea
	ON ea.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PersonPhone] pp
	ON pp.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PhoneNumberType] pnt
	ON pnt.[PhoneNumberTypeID] = pp.[PhoneNumberTypeID];

	

Sales.vIndividualCustomer

//
Individual customers (names and addresses) that purchase Adventure Works Cycles products online.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vIndividualCustomer] 
AS 
SELECT 
    p.[BusinessEntityID]
    ,p.[Title]
    ,p.[FirstName]
    ,p.[MiddleName]
    ,p.[LastName]
    ,p.[Suffix]
    ,pp.[PhoneNumber]
	,pnt.[Name] AS [PhoneNumberType]
    ,ea.[EmailAddress]
    ,p.[EmailPromotion]
    ,at.[Name] AS [AddressType]
    ,a.[AddressLine1]
    ,a.[AddressLine2]
    ,a.[City]
    ,[StateProvinceName] = sp.[Name]
    ,a.[PostalCode]
    ,[CountryRegionName] = cr.[Name]
    ,p.[Demographics]
FROM [Person].[Person] p
    INNER JOIN [Person].[BusinessEntityAddress] bea 
    ON bea.[BusinessEntityID] = p.[BusinessEntityID] 
    INNER JOIN [Person].[Address] a 
    ON a.[AddressID] = bea.[AddressID]
    INNER JOIN [Person].[StateProvince] sp 
    ON sp.[StateProvinceID] = a.[StateProvinceID]
    INNER JOIN [Person].[CountryRegion] cr 
    ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
    INNER JOIN [Person].[AddressType] at 
    ON at.[AddressTypeID] = bea.[AddressTypeID]
	INNER JOIN [Sales].[Customer] c
	ON c.[PersonID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[EmailAddress] ea
	ON ea.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PersonPhone] pp
	ON pp.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PhoneNumberType] pnt
	ON pnt.[PhoneNumberTypeID] = pp.[PhoneNumberTypeID]
WHERE c.StoreID IS NULL;

	

Sales.vPersonDemographics

//
Displays the content from each element in the xml column Demographics for each customer in the Person.Person table.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vPersonDemographics] 
AS 
SELECT 
    p.[BusinessEntityID] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        TotalPurchaseYTD[1]', 'money') AS [TotalPurchaseYTD] 
    ,CONVERT(datetime, REPLACE([IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        DateFirstPurchase[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [DateFirstPurchase] 
    ,CONVERT(datetime, REPLACE([IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        BirthDate[1]', 'nvarchar(20)') ,'Z', ''), 101) AS [BirthDate] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        MaritalStatus[1]', 'nvarchar(1)') AS [MaritalStatus] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        YearlyIncome[1]', 'nvarchar(30)') AS [YearlyIncome] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        Gender[1]', 'nvarchar(1)') AS [Gender] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        TotalChildren[1]', 'integer') AS [TotalChildren] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        NumberChildrenAtHome[1]', 'integer') AS [NumberChildrenAtHome] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        Education[1]', 'nvarchar(30)') AS [Education] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        Occupation[1]', 'nvarchar(30)') AS [Occupation] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        HomeOwnerFlag[1]', 'bit') AS [HomeOwnerFlag] 
    ,[IndividualSurvey].[ref].[value](N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
        NumberCarsOwned[1]', 'integer') AS [NumberCarsOwned] 
FROM [Person].[Person] p 
CROSS APPLY p.[Demographics].nodes(N'declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey"; 
    /IndividualSurvey') AS [IndividualSurvey](ref) 
WHERE [Demographics] IS NOT NULL;

	

Sales.vSalesPerson

//
Sales representiatives (names and addresses) and their sales-related information.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vSalesPerson] 
AS 
SELECT 
    s.[BusinessEntityID]
    ,p.[Title]
    ,p.[FirstName]
    ,p.[MiddleName]
    ,p.[LastName]
    ,p.[Suffix]
    ,e.[JobTitle]
    ,pp.[PhoneNumber]
	,pnt.[Name] AS [PhoneNumberType]
    ,ea.[EmailAddress]
    ,p.[EmailPromotion]
    ,a.[AddressLine1]
    ,a.[AddressLine2]
    ,a.[City]
    ,[StateProvinceName] = sp.[Name]
    ,a.[PostalCode]
    ,[CountryRegionName] = cr.[Name]
    ,[TerritoryName] = st.[Name]
    ,[TerritoryGroup] = st.[Group]
    ,s.[SalesQuota]
    ,s.[SalesYTD]
    ,s.[SalesLastYear]
FROM [Sales].[SalesPerson] s
    INNER JOIN [HumanResources].[Employee] e 
    ON e.[BusinessEntityID] = s.[BusinessEntityID]
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = s.[BusinessEntityID]
    INNER JOIN [Person].[BusinessEntityAddress] bea 
    ON bea.[BusinessEntityID] = s.[BusinessEntityID] 
    INNER JOIN [Person].[Address] a 
    ON a.[AddressID] = bea.[AddressID]
    INNER JOIN [Person].[StateProvince] sp 
    ON sp.[StateProvinceID] = a.[StateProvinceID]
    INNER JOIN [Person].[CountryRegion] cr 
    ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
    LEFT OUTER JOIN [Sales].[SalesTerritory] st 
    ON st.[TerritoryID] = s.[TerritoryID]
	LEFT OUTER JOIN [Person].[EmailAddress] ea
	ON ea.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PersonPhone] pp
	ON pp.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PhoneNumberType] pnt
	ON pnt.[PhoneNumberTypeID] = pp.[PhoneNumberTypeID];

	

Sales.vSalesPersonSalesByFiscalYears

//
Uses PIVOT to return aggregated sales information for each sales representative.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vSalesPersonSalesByFiscalYears] 
AS 
SELECT 
    pvt.[SalesPersonID]
    ,pvt.[FullName]
    ,pvt.[JobTitle]
    ,pvt.[SalesTerritory]
    ,pvt.[2002]
    ,pvt.[2003]
    ,pvt.[2004] 
FROM (SELECT 
        soh.[SalesPersonID]
        ,p.[FirstName] + ' ' + COALESCE(p.[MiddleName], '') + ' ' + p.[LastName] AS [FullName]
        ,e.[JobTitle]
        ,st.[Name] AS [SalesTerritory]
        ,soh.[SubTotal]
        ,YEAR(DATEADD(m, 6, soh.[OrderDate])) AS [FiscalYear] 
    FROM [Sales].[SalesPerson] sp 
        INNER JOIN [Sales].[SalesOrderHeader] soh 
        ON sp.[BusinessEntityID] = soh.[SalesPersonID]
        INNER JOIN [Sales].[SalesTerritory] st 
        ON sp.[TerritoryID] = st.[TerritoryID] 
        INNER JOIN [HumanResources].[Employee] e 
        ON soh.[SalesPersonID] = e.[BusinessEntityID] 
		INNER JOIN [Person].[Person] p
		ON p.[BusinessEntityID] = sp.[BusinessEntityID]
	 ) AS soh 
PIVOT 
(
    SUM([SubTotal]) 
    FOR [FiscalYear] 
    IN ([2002], [2003], [2004])
) AS pvt;

	

Sales.vStoreWithAddresses

//
Stores (including store addresses) that sell Adventure Works Cycles products to consumers.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vStoreWithAddresses] AS 
SELECT 
    s.[BusinessEntityID] 
    ,s.[Name] 
    ,at.[Name] AS [AddressType]
    ,a.[AddressLine1] 
    ,a.[AddressLine2] 
    ,a.[City] 
    ,sp.[Name] AS [StateProvinceName] 
    ,a.[PostalCode] 
    ,cr.[Name] AS [CountryRegionName] 
FROM [Sales].[Store] s
    INNER JOIN [Person].[BusinessEntityAddress] bea 
    ON bea.[BusinessEntityID] = s.[BusinessEntityID] 
    INNER JOIN [Person].[Address] a 
    ON a.[AddressID] = bea.[AddressID]
    INNER JOIN [Person].[StateProvince] sp 
    ON sp.[StateProvinceID] = a.[StateProvinceID]
    INNER JOIN [Person].[CountryRegion] cr 
    ON cr.[CountryRegionCode] = sp.[CountryRegionCode]
    INNER JOIN [Person].[AddressType] at 
    ON at.[AddressTypeID] = bea.[AddressTypeID];

	

Sales.vStoreWithContacts

//
Stores (including store contacts) that sell Adventure Works Cycles products to consumers.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vStoreWithContacts] AS 
SELECT 
    s.[BusinessEntityID] 
    ,s.[Name] 
    ,ct.[Name] AS [ContactType] 
    ,p.[Title] 
    ,p.[FirstName] 
    ,p.[MiddleName] 
    ,p.[LastName] 
    ,p.[Suffix] 
    ,pp.[PhoneNumber] 
	,pnt.[Name] AS [PhoneNumberType]
    ,ea.[EmailAddress] 
    ,p.[EmailPromotion] 
FROM [Sales].[Store] s
    INNER JOIN [Person].[BusinessEntityContact] bec 
    ON bec.[BusinessEntityID] = s.[BusinessEntityID]
	INNER JOIN [Person].[ContactType] ct
	ON ct.[ContactTypeID] = bec.[ContactTypeID]
	INNER JOIN [Person].[Person] p
	ON p.[BusinessEntityID] = bec.[PersonID]
	LEFT OUTER JOIN [Person].[EmailAddress] ea
	ON ea.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PersonPhone] pp
	ON pp.[BusinessEntityID] = p.[BusinessEntityID]
	LEFT OUTER JOIN [Person].[PhoneNumberType] pnt
	ON pnt.[PhoneNumberTypeID] = pp.[PhoneNumberTypeID];

	

Sales.vStoreWithDemographics

//
Stores (including demographics) that sell Adventure Works Cycles products to consumers.

Created: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:39 GMT-0400 (Eastern Daylight Time)

Definition


CREATE VIEW [Sales].[vStoreWithDemographics] AS 
SELECT 
    s.[BusinessEntityID] 
    ,s.[Name] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/AnnualSales)[1]', 'money') AS [AnnualSales] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/AnnualRevenue)[1]', 'money') AS [AnnualRevenue] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/BankName)[1]', 'nvarchar(50)') AS [BankName] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/BusinessType)[1]', 'nvarchar(5)') AS [BusinessType] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/YearOpened)[1]', 'integer') AS [YearOpened] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/Specialty)[1]', 'nvarchar(50)') AS [Specialty] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/SquareFeet)[1]', 'integer') AS [SquareFeet] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/Brands)[1]', 'nvarchar(30)') AS [Brands] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/Internet)[1]', 'nvarchar(30)') AS [Internet] 
    ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; 
        (/StoreSurvey/NumberEmployees)[1]', 'integer') AS [NumberEmployees] 
FROM [Sales].[Store] s;

	

Stored Procedures

uspGetBillOfMaterials uspGetEmployeeManagers uspGetManagerEmployees uspGetWhereUsedProductID uspLogError uspPrintError uspSearchCandidateResumes HumanResources.uspUpdateEmployeeHireInfo HumanResources.uspUpdateEmployeeLogin HumanResources.uspUpdateEmployeePersonalInfo

uspGetBillOfMaterials

//
Stored procedure using a recursive query to return a multi-level bill of material for the specified ProductID.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [dbo].[uspGetBillOfMaterials]
    @StartProductID [int],
    @CheckDate [datetime]
AS
BEGIN
    SET NOCOUNT ON;

    -- Use recursive query to generate a multi-level Bill of Material (i.e. all level 1 
    -- components of a level 0 assembly, all level 2 components of a level 1 assembly)
    -- The CheckDate eliminates any components that are no longer used in the product on this date.
    WITH [BOM_cte]([ProductAssemblyID], [ComponentID], [ComponentDesc], [PerAssemblyQty], [StandardCost], [ListPrice], [BOMLevel], [RecursionLevel]) -- CTE name and columns
    AS (
        SELECT b.[ProductAssemblyID], b.[ComponentID], p.[Name], b.[PerAssemblyQty], p.[StandardCost], p.[ListPrice], b.[BOMLevel], 0 -- Get the initial list of components for the bike assembly
        FROM [Production].[BillOfMaterials] b
            INNER JOIN [Production].[Product] p 
            ON b.[ComponentID] = p.[ProductID] 
        WHERE b.[ProductAssemblyID] = @StartProductID 
            AND @CheckDate >= b.[StartDate] 
            AND @CheckDate <= ISNULL(b.[EndDate], @CheckDate)
        UNION ALL
        SELECT b.[ProductAssemblyID], b.[ComponentID], p.[Name], b.[PerAssemblyQty], p.[StandardCost], p.[ListPrice], b.[BOMLevel], [RecursionLevel] + 1 -- Join recursive member to anchor
        FROM [BOM_cte] cte
            INNER JOIN [Production].[BillOfMaterials] b 
            ON b.[ProductAssemblyID] = cte.[ComponentID]
            INNER JOIN [Production].[Product] p 
            ON b.[ComponentID] = p.[ProductID] 
        WHERE @CheckDate >= b.[StartDate] 
            AND @CheckDate <= ISNULL(b.[EndDate], @CheckDate)
        )
    -- Outer select from the CTE
    SELECT b.[ProductAssemblyID], b.[ComponentID], b.[ComponentDesc], SUM(b.[PerAssemblyQty]) AS [TotalQuantity] , b.[StandardCost], b.[ListPrice], b.[BOMLevel], b.[RecursionLevel]
    FROM [BOM_cte] b
    GROUP BY b.[ComponentID], b.[ComponentDesc], b.[ProductAssemblyID], b.[BOMLevel], b.[RecursionLevel], b.[StandardCost], b.[ListPrice]
    ORDER BY b.[BOMLevel], b.[ProductAssemblyID], b.[ComponentID]
    OPTION (MAXRECURSION 25) 
END;

	

uspGetEmployeeManagers

//
Stored procedure using a recursive query to return the direct and indirect managers of the specified employee.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [dbo].[uspGetEmployeeManagers]
    @BusinessEntityID [int]
AS
BEGIN
    SET NOCOUNT ON;

    -- Use recursive query to list out all Employees required for a particular Manager
    WITH [EMP_cte]([BusinessEntityID], [OrganizationNode], [FirstName], [LastName], [JobTitle], [RecursionLevel]) -- CTE name and columns
    AS (
        SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], e.[JobTitle], 0 -- Get the initial Employee
        FROM [HumanResources].[Employee] e 
			INNER JOIN [Person].[Person] as p
			ON p.[BusinessEntityID] = e.[BusinessEntityID]
        WHERE e.[BusinessEntityID] = @BusinessEntityID
        UNION ALL
        SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], e.[JobTitle], [RecursionLevel] + 1 -- Join recursive member to anchor
        FROM [HumanResources].[Employee] e 
            INNER JOIN [EMP_cte]
            ON e.[OrganizationNode] = [EMP_cte].[OrganizationNode].GetAncestor(1)
            INNER JOIN [Person].[Person] p 
            ON p.[BusinessEntityID] = e.[BusinessEntityID]
    )
    -- Join back to Employee to return the manager name 
    SELECT [EMP_cte].[RecursionLevel], [EMP_cte].[BusinessEntityID], [EMP_cte].[FirstName], [EMP_cte].[LastName], 
        [EMP_cte].[OrganizationNode].ToString() AS [OrganizationNode], p.[FirstName] AS 'ManagerFirstName', p.[LastName] AS 'ManagerLastName'  -- Outer select from the CTE
    FROM [EMP_cte] 
        INNER JOIN [HumanResources].[Employee] e 
        ON [EMP_cte].[OrganizationNode].GetAncestor(1) = e.[OrganizationNode]
        INNER JOIN [Person].[Person] p 
        ON p.[BusinessEntityID] = e.[BusinessEntityID]
    ORDER BY [RecursionLevel], [EMP_cte].[OrganizationNode].ToString()
    OPTION (MAXRECURSION 25) 
END;

	

uspGetManagerEmployees

//
Stored procedure using a recursive query to return the direct and indirect employees of the specified manager.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [dbo].[uspGetManagerEmployees]
    @BusinessEntityID [int]
AS
BEGIN
    SET NOCOUNT ON;

    -- Use recursive query to list out all Employees required for a particular Manager
    WITH [EMP_cte]([BusinessEntityID], [OrganizationNode], [FirstName], [LastName], [RecursionLevel]) -- CTE name and columns
    AS (
        SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], 0 -- Get the initial list of Employees for Manager n
        FROM [HumanResources].[Employee] e 
			INNER JOIN [Person].[Person] p 
			ON p.[BusinessEntityID] = e.[BusinessEntityID]
        WHERE e.[BusinessEntityID] = @BusinessEntityID
        UNION ALL
        SELECT e.[BusinessEntityID], e.[OrganizationNode], p.[FirstName], p.[LastName], [RecursionLevel] + 1 -- Join recursive member to anchor
        FROM [HumanResources].[Employee] e 
            INNER JOIN [EMP_cte]
            ON e.[OrganizationNode].GetAncestor(1) = [EMP_cte].[OrganizationNode]
			INNER JOIN [Person].[Person] p 
			ON p.[BusinessEntityID] = e.[BusinessEntityID]
        )
    -- Join back to Employee to return the manager name 
    SELECT [EMP_cte].[RecursionLevel], [EMP_cte].[OrganizationNode].ToString() as [OrganizationNode], p.[FirstName] AS 'ManagerFirstName', p.[LastName] AS 'ManagerLastName',
        [EMP_cte].[BusinessEntityID], [EMP_cte].[FirstName], [EMP_cte].[LastName] -- Outer select from the CTE
    FROM [EMP_cte] 
        INNER JOIN [HumanResources].[Employee] e 
        ON [EMP_cte].[OrganizationNode].GetAncestor(1) = e.[OrganizationNode]
			INNER JOIN [Person].[Person] p 
			ON p.[BusinessEntityID] = e.[BusinessEntityID]
    ORDER BY [RecursionLevel], [EMP_cte].[OrganizationNode].ToString()
    OPTION (MAXRECURSION 25) 
END;

	

uspGetWhereUsedProductID

//
Stored procedure using a recursive query to return all components or assemblies that directly or indirectly use the specified ProductID.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [dbo].[uspGetWhereUsedProductID]
    @StartProductID [int],
    @CheckDate [datetime]
AS
BEGIN
    SET NOCOUNT ON;

    --Use recursive query to generate a multi-level Bill of Material (i.e. all level 1 components of a level 0 assembly, all level 2 components of a level 1 assembly)
    WITH [BOM_cte]([ProductAssemblyID], [ComponentID], [ComponentDesc], [PerAssemblyQty], [StandardCost], [ListPrice], [BOMLevel], [RecursionLevel]) -- CTE name and columns
    AS (
        SELECT b.[ProductAssemblyID], b.[ComponentID], p.[Name], b.[PerAssemblyQty], p.[StandardCost], p.[ListPrice], b.[BOMLevel], 0 -- Get the initial list of components for the bike assembly
        FROM [Production].[BillOfMaterials] b
            INNER JOIN [Production].[Product] p 
            ON b.[ProductAssemblyID] = p.[ProductID] 
        WHERE b.[ComponentID] = @StartProductID 
            AND @CheckDate >= b.[StartDate] 
            AND @CheckDate <= ISNULL(b.[EndDate], @CheckDate)
        UNION ALL
        SELECT b.[ProductAssemblyID], b.[ComponentID], p.[Name], b.[PerAssemblyQty], p.[StandardCost], p.[ListPrice], b.[BOMLevel], [RecursionLevel] + 1 -- Join recursive member to anchor
        FROM [BOM_cte] cte
            INNER JOIN [Production].[BillOfMaterials] b 
            ON cte.[ProductAssemblyID] = b.[ComponentID]
            INNER JOIN [Production].[Product] p 
            ON b.[ProductAssemblyID] = p.[ProductID] 
        WHERE @CheckDate >= b.[StartDate] 
            AND @CheckDate <= ISNULL(b.[EndDate], @CheckDate)
        )
    -- Outer select from the CTE
    SELECT b.[ProductAssemblyID], b.[ComponentID], b.[ComponentDesc], SUM(b.[PerAssemblyQty]) AS [TotalQuantity] , b.[StandardCost], b.[ListPrice], b.[BOMLevel], b.[RecursionLevel]
    FROM [BOM_cte] b
    GROUP BY b.[ComponentID], b.[ComponentDesc], b.[ProductAssemblyID], b.[BOMLevel], b.[RecursionLevel], b.[StandardCost], b.[ListPrice]
    ORDER BY b.[BOMLevel], b.[ProductAssemblyID], b.[ComponentID]
    OPTION (MAXRECURSION 25) 
END;

	

uspLogError

//
Logs error information in the ErrorLog table about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without inserting error information.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


-- uspLogError logs error information in the ErrorLog table about the 
-- error that caused execution to jump to the CATCH block of a 
-- TRY...CATCH construct. This should be executed from within the scope 
-- of a CATCH block otherwise it will return without inserting error 
-- information. 
CREATE PROCEDURE [dbo].[uspLogError] 
    @ErrorLogID [int] = 0 OUTPUT -- contains the ErrorLogID of the row inserted
AS                               -- by uspLogError in the ErrorLog table
BEGIN
    SET NOCOUNT ON;

    -- Output parameter value of 0 indicates that error 
    -- information was not logged
    SET @ErrorLogID = 0;

    BEGIN TRY
        -- Return if there is no error information to log
        IF ERROR_NUMBER() IS NULL
            RETURN;

        -- Return if inside an uncommittable transaction.
        -- Data insertion/modification is not allowed when 
        -- a transaction is in an uncommittable state.
        IF XACT_STATE() = -1
        BEGIN
            PRINT 'Cannot log error since the current transaction is in an uncommittable state. ' 
                + 'Rollback the transaction before executing uspLogError in order to successfully log error information.';
            RETURN;
        END

        INSERT [dbo].[ErrorLog] 
            (
            [UserName], 
            [ErrorNumber], 
            [ErrorSeverity], 
            [ErrorState], 
            [ErrorProcedure], 
            [ErrorLine], 
            [ErrorMessage]
            ) 
        VALUES 
            (
            CONVERT(sysname, CURRENT_USER), 
            ERROR_NUMBER(),
            ERROR_SEVERITY(),
            ERROR_STATE(),
            ERROR_PROCEDURE(),
            ERROR_LINE(),
            ERROR_MESSAGE()
            );

        -- Pass back the ErrorLogID of the row inserted
        SET @ErrorLogID = @@IDENTITY;
    END TRY
    BEGIN CATCH
        PRINT 'An error occurred in stored procedure uspLogError: ';
        EXECUTE [dbo].[uspPrintError];
        RETURN -1;
    END CATCH
END;

	

uspPrintError

//
Prints error information about the error that caused execution to jump to the CATCH block of a TRY...CATCH construct. Should be executed from within the scope of a CATCH block otherwise it will return without printing any error information.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time)

Definition


-- uspPrintError prints error information about the error that caused 
-- execution to jump to the CATCH block of a TRY...CATCH construct. 
-- Should be executed from within the scope of a CATCH block otherwise 
-- it will return without printing any error information.
CREATE PROCEDURE [dbo].[uspPrintError] 
AS
BEGIN
    SET NOCOUNT ON;

    -- Print error information. 
    PRINT 'Error ' + CONVERT(varchar(50), ERROR_NUMBER()) +
          ', Severity ' + CONVERT(varchar(5), ERROR_SEVERITY()) +
          ', State ' + CONVERT(varchar(5), ERROR_STATE()) + 
          ', Procedure ' + ISNULL(ERROR_PROCEDURE(), '-') + 
          ', Line ' + CONVERT(varchar(5), ERROR_LINE());
    PRINT ERROR_MESSAGE();
END;

	

uspSearchCandidateResumes

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


--A stored procedure which demonstrates integrated full text search

CREATE PROCEDURE [dbo].[uspSearchCandidateResumes]
    @searchString [nvarchar](1000),   
    @useInflectional [bit]=0,
    @useThesaurus [bit]=0,
    @language[int]=0


WITH EXECUTE AS CALLER
AS
BEGIN
    SET NOCOUNT ON;

      DECLARE @string nvarchar(1050)
      --setting the lcid to the default instance LCID if needed
      IF @language = NULL OR @language = 0 
      BEGIN 
            SELECT @language =CONVERT(int, serverproperty('lcid'))  
      END
      

            --FREETEXTTABLE case as inflectional and Thesaurus were required
      IF @useThesaurus = 1 AND @useInflectional = 1  
        BEGIN
                  SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL 
                        INNER JOIN FREETEXTTABLE([HumanResources].[JobCandidate],*, @searchString,LANGUAGE @language) AS KEY_TBL
                   ON  FT_TBL.[JobCandidateID] =KEY_TBL.[KEY]
            END

      ELSE IF @useThesaurus = 1
            BEGIN
                  SELECT @string ='FORMSOF(THESAURUS,"'+@searchString +'"'+')'      
                  SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL 
                        INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*, @string,LANGUAGE @language) AS KEY_TBL
                   ON  FT_TBL.[JobCandidateID] =KEY_TBL.[KEY]
        END

      ELSE IF @useInflectional = 1
            BEGIN
                  SELECT @string ='FORMSOF(INFLECTIONAL,"'+@searchString +'"'+')'
                  SELECT FT_TBL.[JobCandidateID], KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL 
                        INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*, @string,LANGUAGE @language) AS KEY_TBL
                   ON  FT_TBL.[JobCandidateID] =KEY_TBL.[KEY]
        END
  
      ELSE --base case, plain CONTAINSTABLE
            BEGIN
                  SELECT @string='"'+@searchString +'"'
                  SELECT FT_TBL.[JobCandidateID],KEY_TBL.[RANK] FROM [HumanResources].[JobCandidate] AS FT_TBL 
                        INNER JOIN CONTAINSTABLE([HumanResources].[JobCandidate],*,@string,LANGUAGE @language) AS KEY_TBL
                   ON  FT_TBL.[JobCandidateID] =KEY_TBL.[KEY]
            END

END;

	

HumanResources.uspUpdateEmployeeHireInfo

//
Updates the Employee table and inserts a new row in the EmployeePayHistory table with the values specified in the input parameters.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [HumanResources].[uspUpdateEmployeeHireInfo]
    @BusinessEntityID [int], 
    @JobTitle [nvarchar](50), 
    @HireDate [datetime], 
    @RateChangeDate [datetime], 
    @Rate [money], 
    @PayFrequency [tinyint], 
    @CurrentFlag [dbo].[Flag] 
WITH EXECUTE AS CALLER
AS
BEGIN
    SET NOCOUNT ON;

    BEGIN TRY
        BEGIN TRANSACTION;

        UPDATE [HumanResources].[Employee] 
        SET [JobTitle] = @JobTitle 
            ,[HireDate] = @HireDate 
            ,[CurrentFlag] = @CurrentFlag 
        WHERE [BusinessEntityID] = @BusinessEntityID;

        INSERT INTO [HumanResources].[EmployeePayHistory] 
            ([BusinessEntityID]
            ,[RateChangeDate]
            ,[Rate]
            ,[PayFrequency]) 
        VALUES (@BusinessEntityID, @RateChangeDate, @Rate, @PayFrequency);

        COMMIT TRANSACTION;
    END TRY
    BEGIN CATCH
        -- Rollback any active or uncommittable transactions before
        -- inserting information in the ErrorLog
        IF @@TRANCOUNT > 0
        BEGIN
            ROLLBACK TRANSACTION;
        END

        EXECUTE [dbo].[uspLogError];
    END CATCH;
END;

	

HumanResources.uspUpdateEmployeeLogin

//
Updates the Employee table with the values specified in the input parameters for the given BusinessEntityID.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [HumanResources].[uspUpdateEmployeeLogin]
    @BusinessEntityID [int], 
    @OrganizationNode [hierarchyid],
    @LoginID [nvarchar](256),
    @JobTitle [nvarchar](50),
    @HireDate [datetime],
    @CurrentFlag [dbo].[Flag]
WITH EXECUTE AS CALLER
AS
BEGIN
    SET NOCOUNT ON;

    BEGIN TRY
        UPDATE [HumanResources].[Employee] 
        SET [OrganizationNode] = @OrganizationNode 
            ,[LoginID] = @LoginID 
            ,[JobTitle] = @JobTitle 
            ,[HireDate] = @HireDate 
            ,[CurrentFlag] = @CurrentFlag 
        WHERE [BusinessEntityID] = @BusinessEntityID;
    END TRY
    BEGIN CATCH
        EXECUTE [dbo].[uspLogError];
    END CATCH;
END;

	

HumanResources.uspUpdateEmployeePersonalInfo

//
Updates the Employee table with the values specified in the input parameters for the given EmployeeID.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time)

Parameters

Definition


CREATE PROCEDURE [HumanResources].[uspUpdateEmployeePersonalInfo]
    @BusinessEntityID [int], 
    @NationalIDNumber [nvarchar](15), 
    @BirthDate [datetime], 
    @MaritalStatus [nchar](1), 
    @Gender [nchar](1)
WITH EXECUTE AS CALLER
AS
BEGIN
    SET NOCOUNT ON;

    BEGIN TRY
        UPDATE [HumanResources].[Employee] 
        SET [NationalIDNumber] = @NationalIDNumber 
            ,[BirthDate] = @BirthDate 
            ,[MaritalStatus] = @MaritalStatus 
            ,[Gender] = @Gender 
        WHERE [BusinessEntityID] = @BusinessEntityID;
    END TRY
    BEGIN CATCH
        EXECUTE [dbo].[uspLogError];
    END CATCH;
END;

	

Functions: Scalar

ufnGetAccountingEndDate ufnGetAccountingStartDate ufnGetDocumentStatusText ufnGetProductDealerPrice ufnGetProductListPrice ufnGetProductStandardCost ufnGetPurchaseOrderStatusText ufnGetSalesOrderStatusText ufnGetStock ufnLeadingZeros

ufnGetAccountingEndDate

//
Scalar function used in the uSalesOrderHeader trigger to set the starting account date.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetAccountingEndDate]()
RETURNS [datetime] 
AS 
BEGIN
    RETURN DATEADD(millisecond, -2, CONVERT(datetime, '20040701', 112));
END;

	

ufnGetAccountingStartDate

//
Scalar function used in the uSalesOrderHeader trigger to set the ending account date.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetAccountingStartDate]()
RETURNS [datetime] 
AS 
BEGIN
    RETURN CONVERT(datetime, '20030701', 112);
END;

	

ufnGetDocumentStatusText

//
Scalar function returning the text representation of the Status column in the Document table.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetDocumentStatusText](@Status [tinyint])
RETURNS [nvarchar](16) 
AS 
-- Returns the sales order status text representation for the status value.
BEGIN
    DECLARE @ret [nvarchar](16);

    SET @ret = 
        CASE @Status
            WHEN 1 THEN N'Pending approval'
            WHEN 2 THEN N'Approved'
            WHEN 3 THEN N'Obsolete'
            ELSE N'** Invalid **'
        END;
    
    RETURN @ret
END;

	

ufnGetProductDealerPrice

//
Scalar function returning the dealer price for a given product on a particular order date.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition




CREATE FUNCTION [dbo].[ufnGetProductDealerPrice](@ProductID [int], @OrderDate [datetime])
RETURNS [money] 
AS 
-- Returns the dealer price for the product on a specific date.
BEGIN
    DECLARE @DealerPrice money;
    DECLARE @DealerDiscount money;

    SET @DealerDiscount = 0.60  -- 60% of list price

    SELECT @DealerPrice = plph.[ListPrice] * @DealerDiscount 
    FROM [Production].[Product] p 
        INNER JOIN [Production].[ProductListPriceHistory] plph 
        ON p.[ProductID] = plph.[ProductID] 
            AND p.[ProductID] = @ProductID 
            AND @OrderDate BETWEEN plph.[StartDate] AND COALESCE(plph.[EndDate], CONVERT(datetime, '99991231', 112)); -- Make sure we get all the prices!

    RETURN @DealerPrice;
END;

	

ufnGetProductListPrice

//
Scalar function returning the list price for a given product on a particular order date.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetProductListPrice](@ProductID [int], @OrderDate [datetime])
RETURNS [money] 
AS 
BEGIN
    DECLARE @ListPrice money;

    SELECT @ListPrice = plph.[ListPrice] 
    FROM [Production].[Product] p 
        INNER JOIN [Production].[ProductListPriceHistory] plph 
        ON p.[ProductID] = plph.[ProductID] 
            AND p.[ProductID] = @ProductID 
            AND @OrderDate BETWEEN plph.[StartDate] AND COALESCE(plph.[EndDate], CONVERT(datetime, '99991231', 112)); -- Make sure we get all the prices!

    RETURN @ListPrice;
END;

	

ufnGetProductStandardCost

//
Scalar function returning the standard cost for a given product on a particular order date.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetProductStandardCost](@ProductID [int], @OrderDate [datetime])
RETURNS [money] 
AS 
-- Returns the standard cost for the product on a specific date.
BEGIN
    DECLARE @StandardCost money;

    SELECT @StandardCost = pch.[StandardCost] 
    FROM [Production].[Product] p 
        INNER JOIN [Production].[ProductCostHistory] pch 
        ON p.[ProductID] = pch.[ProductID] 
            AND p.[ProductID] = @ProductID 
            AND @OrderDate BETWEEN pch.[StartDate] AND COALESCE(pch.[EndDate], CONVERT(datetime, '99991231', 112)); -- Make sure we get all the prices!

    RETURN @StandardCost;
END;

	

ufnGetPurchaseOrderStatusText

//
Scalar function returning the text representation of the Status column in the PurchaseOrderHeader table.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetPurchaseOrderStatusText](@Status [tinyint])
RETURNS [nvarchar](15) 
AS 
-- Returns the sales order status text representation for the status value.
BEGIN
    DECLARE @ret [nvarchar](15);

    SET @ret = 
        CASE @Status
            WHEN 1 THEN 'Pending'
            WHEN 2 THEN 'Approved'
            WHEN 3 THEN 'Rejected'
            WHEN 4 THEN 'Complete'
            ELSE '** Invalid **'
        END;
    
    RETURN @ret
END;

	

ufnGetSalesOrderStatusText

//
Scalar function returning the text representation of the Status column in the SalesOrderHeader table.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetSalesOrderStatusText](@Status [tinyint])
RETURNS [nvarchar](15) 
AS 
-- Returns the sales order status text representation for the status value.
BEGIN
    DECLARE @ret [nvarchar](15);

    SET @ret = 
        CASE @Status
            WHEN 1 THEN 'In process'
            WHEN 2 THEN 'Approved'
            WHEN 3 THEN 'Backordered'
            WHEN 4 THEN 'Rejected'
            WHEN 5 THEN 'Shipped'
            WHEN 6 THEN 'Cancelled'
            ELSE '** Invalid **'
        END;
    
    RETURN @ret
END;

	

ufnGetStock

//
Scalar function returning the quantity of inventory in LocationID 6 (Miscellaneous Storage)for a specified ProductID.

Created: Thu Jul 17 2014 12:11:40 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnGetStock](@ProductID [int])
RETURNS [int] 
AS 
-- Returns the stock level for the product. This function is used internally only
BEGIN
    DECLARE @ret int;
    
    SELECT @ret = SUM(p.[Quantity]) 
    FROM [Production].[ProductInventory] p 
    WHERE p.[ProductID] = @ProductID 
        AND p.[LocationID] = '6'; -- Only look at inventory in the misc storage
    
    IF (@ret IS NULL) 
        SET @ret = 0
    
    RETURN @ret
END;

	

ufnLeadingZeros

//
Scalar function used by the Sales.Customer table to help set the account number.

Created: Thu Jul 17 2014 12:11:14 GMT-0400 (Eastern Daylight Time), Modified: Thu Jan 20 2022 08:46:04 GMT-0500 (Eastern Standard Time)

Parameters

Definition


CREATE FUNCTION [dbo].[ufnLeadingZeros](
    @Value int
) 
RETURNS varchar(8) 
WITH SCHEMABINDING 
AS 
BEGIN
    DECLARE @ReturnValue varchar(8);

    SET @ReturnValue = CONVERT(varchar(8), @Value);
    SET @ReturnValue = REPLICATE('0', 8 - DATALENGTH(@ReturnValue)) + @ReturnValue;

    RETURN (@ReturnValue);
END;