← All tables and views
AdventureWorks OLTP view
Purchasing.vVendorWithAddresses
Native view in the AdventureWorks OLTP sample database.
104rows
9 columns
Schema from the provider contract| Column | Type | Nullable | Key | References |
|---|---|---|---|---|
BusinessEntityID | | yes | — | — |
Name | | yes | — | — |
AddressType | | yes | — | — |
AddressLine1 | | yes | — | — |
AddressLine2 | | yes | — | — |
City | | yes | — | — |
StateProvinceName | | yes | — | — |
PostalCode | | yes | — | — |
CountryRegionName | | yes | — | — |
View 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"Data preview
Sample records
| BusinessEntityID | Name | AddressType | AddressLine1 | AddressLine2 | City | StateProvinceName |
|---|---|---|---|---|---|---|
| 1492 | Australia Bike Retailer | Main Office | 28 San Marino Ct. | NULL | Bellingham | Washington |
| 1494 | Allenson Cycles | Main Office | 4659 Montoya | NULL | Altadena | California |
| 1496 | Advanced Bicycles | Main Office | 7995 Edwards Ave. | NULL | Lynnwood | Washington |
| 1498 | Trikes, Inc. | Main Office | 90 Sunny Ave | NULL | Berkeley | California |
| 1500 | Morgan Bike Accessories | Main Office | 9098 Story Lane | NULL | Albany | New York |
| 1502 | Cycling Master | Main Office | 4823 Stonewood Ct. | NULL | Walla Walla | Washington |
| 1504 | Chicago Rent-All | Main Office | 15 Pear Dr. | NULL | Newport Beach | California |
| 1506 | Greenwood Athletic Company | Main Office | 6441 Co Road | NULL | Lemon Grove | Arizona |