Difference between revisions of "Person.vStateProvinceCountryRegion (view)"

From dbscript Online Help
Jump to: navigation, search
Line 59: Line 59:
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
|- style="background:silver"
 
|- style="background:silver"
 +
| '''Dependency Type
 +
| '''Object Type
 
| '''Referenced Object
 
| '''Referenced Object
| '''Object Type
 
| '''Dependency Type
 
  
 
|-
 
|-
 +
| Select
 +
| Table
 
| [[Person.CountryRegion_(table)|Person.CountryRegion]]
 
| [[Person.CountryRegion_(table)|Person.CountryRegion]]
 +
 +
|-
 +
| Select
 
| Table
 
| Table
| Select
 
|-
 
 
| [[Person.StateProvince_(table)|Person.StateProvince]]
 
| [[Person.StateProvince_(table)|Person.StateProvince]]
| Table
+
 
| Select
 
 
|-
 
|-
| [[.Person_(schema)|.Person]]
 
 
| Schema
 
| Schema
 
| Schema
 
| Schema
 +
| [[Person_(schema)|Person]]
 +
 
|}
 
|}

Revision as of 06:39, 30 November 2009

wikibot

view Person.vStateProvinceCountryRegion
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];

automatically generated

view Person.vStateProvinceCountryRegion
Description Joins StateProvince table with CountryRegion table.

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];


Dependency Type Object Type Referenced Object
Select Table Person.CountryRegion
Select Table Person.StateProvince
Schema Schema Person