ScrewTurn Wiki
Navigation
Main Page
Random Page
Create a new Page
All Pages
Categories
Administration
File Management
Login/Logout
Language Selection
Your Profile
Create Account
Quick Search
Advanced Search »
Back
History
Purchasing.vVendor_(view)
== wikibot == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- valign="top" | '''View''' | Purchasing.vVendor |- valign="top" | '''Description''' | Vendor (company) names and addresses and the names of vendor employees to contact. |} === Source === {{{{<nowiki> CREATE VIEW [Purchasing].[vVendor] AS SELECT v.[VendorID] ,v.[Name] ,ct.[Name] AS [ContactType] ,c.[Title] ,c.[FirstName] ,c.[MiddleName] ,c.[LastName] ,c.[Suffix] ,c.[Phone] ,c.[EmailAddress] ,c.[EmailPromotion] ,a.[AddressLine1] ,a.[AddressLine2] ,a.[City] ,[StateProvinceName] = sp.[Name] ,a.[PostalCode] ,[CountryRegionName] = cr.[Name] FROM [Purchasing].[Vendor] v INNER JOIN [Purchasing].[VendorContact] vc ON vc.[VendorID] = v.[VendorID] INNER JOIN [Person].[Contact] c ON c.[ContactID] = vc.[ContactID] INNER JOIN [Person].[ContactType] ct ON vc.[ContactTypeID] = ct.[ContactTypeID] INNER JOIN [Purchasing].[VendorAddress] va ON va.[VendorID] = v.[VendorID] INNER JOIN [Person].[Address] a ON a.[AddressID] = va.[AddressID] INNER JOIN [Person].[StateProvince] sp ON sp.[StateProvinceID] = a.[StateProvinceID] INNER JOIN [Person].[CountryRegion] cr ON cr.[CountryRegionCode] = sp.[CountryRegionCode]; </nowiki>}}}} === References === {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Dependency Type''' | '''Object Type''' | '''Referenced Object''' |- valign="top" | Select | Table | [[Person.Address_(table)|Person.Address]] |- valign="top" | Select | Table | [[Person.Contact_(table)|Person.Contact]] |- valign="top" | Select | Table | [[Person.ContactType_(table)|Person.ContactType]] |- valign="top" | Select | Table | [[Person.CountryRegion_(table)|Person.CountryRegion]] |- valign="top" | Select | Table | [[Person.StateProvince_(table)|Person.StateProvince]] |- valign="top" | Select | Table | [[Purchasing.Vendor_(table)|Purchasing.Vendor]] |- valign="top" | Select | Table | [[Purchasing.VendorAddress_(table)|Purchasing.VendorAddress]] |- valign="top" | Select | Table | [[Purchasing.VendorContact_(table)|Purchasing.VendorContact]] |- valign="top" | Schema | Schema | [[Purchasing_(schema)|Purchasing]] |} == automatically generated == {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- | '''view''' | Purchasing.vVendor |- valign="top" | '''Description''' | Vendor (company) names and addresses and the names of vendor employees to contact. |- |} {{{{<nowiki> CREATE VIEW [Purchasing].[vVendor] AS SELECT v.[VendorID] ,v.[Name] ,ct.[Name] AS [ContactType] ,c.[Title] ,c.[FirstName] ,c.[MiddleName] ,c.[LastName] ,c.[Suffix] ,c.[Phone] ,c.[EmailAddress] ,c.[EmailPromotion] ,a.[AddressLine1] ,a.[AddressLine2] ,a.[City] ,[StateProvinceName] = sp.[Name] ,a.[PostalCode] ,[CountryRegionName] = cr.[Name] FROM [Purchasing].[Vendor] v INNER JOIN [Purchasing].[VendorContact] vc ON vc.[VendorID] = v.[VendorID] INNER JOIN [Person].[Contact] c ON c.[ContactID] = vc.[ContactID] INNER JOIN [Person].[ContactType] ct ON vc.[ContactTypeID] = ct.[ContactTypeID] INNER JOIN [Purchasing].[VendorAddress] va ON va.[VendorID] = v.[VendorID] INNER JOIN [Person].[Address] a ON a.[AddressID] = va.[AddressID] INNER JOIN [Person].[StateProvince] sp ON sp.[StateProvinceID] = a.[StateProvinceID] INNER JOIN [Person].[CountryRegion] cr ON cr.[CountryRegionCode] = sp.[CountryRegionCode]; </nowiki>}}}} {| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse" |- style="background:silver" | '''Dependency Type''' | '''Object Type''' | '''Referenced Object''' |- | Select | Table | [[Person.Address_(table)|Person.Address]] |- | Select | Table | [[Person.Contact_(table)|Person.Contact]] |- | Select | Table | [[Person.ContactType_(table)|Person.ContactType]] |- | Select | Table | [[Person.CountryRegion_(table)|Person.CountryRegion]] |- | Select | Table | [[Person.StateProvince_(table)|Person.StateProvince]] |- | Select | Table | [[Purchasing.Vendor_(table)|Purchasing.Vendor]] |- | Select | Table | [[Purchasing.VendorAddress_(table)|Purchasing.VendorAddress]] |- | Select | Table | [[Purchasing.VendorContact_(table)|Purchasing.VendorContact]] |- | Schema | Schema | [[Purchasing_(schema)|Purchasing]] |}
ScrewTurn Wiki version 2.0.36. Some of the icons created by
FamFamFam
.