| Property | Value |
|---|---|
| Name | vEmployeeDepartmentHistory |
| ID | 1835153583 |
| Schema | HumanResources |
| Owner | dbo |
| Encrypted |
|
| Schema Bound |
|
| With Check Option |
|
| ANSI NULLS |
|
| Uses Quoted Identifier |
|
| Has Opaque Metadata |
|
| Published |
|
| Schema Published |
|
| Replicated |
|
| Has Replication Filter |
|
| Has Unchecked Assembly Data |
|
| Date Correlation View |
|
| Uses Database Collation |
|
| Tracked by CDC |
|
| MS Shipped |
|
| Modify Date | 8/8/2010 5:23:45 PM |
| Create Date | 8/8/2010 5:23:45 PM |
| Name | Value |
|---|---|
| MS_Description | Returns employee name and current and previous departments. |
| Column Name | Datatype | Nullable | Is Identity |
|---|---|---|---|
| BusinessEntityID | int |
|
|
| Title | nvarchar(8) |
|
|
| FirstName | Name |
|
|
| MiddleName | Name |
|
|
| LastName | Name |
|
|
| Suffix | nvarchar(10) |
|
|
| Shift | Name |
|
|
| Department | Name |
|
|
| GroupName | Name |
|
|
| StartDate | date |
|
|
| EndDate | date |
|
|
| Script |
|---|
| SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON 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]; EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Returns employee name and current and previous departments.' , @level0type=N'SCHEMA',@level0name=N'HumanResources', @level1type=N'VIEW',@level1name=N'vEmployeeDepartmentHistory' |