view icon View: vVendorWithContacts

Properties

Property Value
Name vVendorWithContacts
ID 2075154438
Schema Purchasing
Owner dbo
Encrypted false
Schema Bound false
With Check Option false
ANSI NULLS true
Uses Quoted Identifier true
Has Opaque Metadata false
Published false
Schema Published false
Replicated false
Has Replication Filter false
Has Unchecked Assembly Data false
Date Correlation View false
Uses Database Collation false
Tracked by CDC false
MS Shipped false
Modify Date 8/8/2010 5:23:46 PM
Create Date 8/8/2010 5:23:46 PM

Extended Properties

Name Value
MS_Description Vendor (company) names and the names of vendor employees to contact.

View Columns

Column Name Datatype Nullable Is Identity
BusinessEntityID int false false
Name Name false false
ContactType Name false false
Title nvarchar(8) true false
FirstName Name false false
MiddleName Name true false
LastName Name false false
Suffix nvarchar(10) true false
PhoneNumber Phone true false
PhoneNumberType Name true false
EmailAddress nvarchar(50) true false
EmailPromotion int false false

Indexes

No view indexes defined.

Object Level Permissions

No object level permissions defined.

Column Level Permissions

No explicit column permissions granted to this object

Objects that depend on [vVendorWithContacts]

Objects on which [vVendorWithContacts] depends

SQL

Script
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
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];
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Vendor (company) names and the names of vendor employees to contact.' , @level0type=N'SCHEMA',@level0name=N'Purchasing', @level1type=N'VIEW',@level1name=N'vVendorWithContacts'

See also

List of Views