Difference between revisions of "Production.vProductAndDescription (view)"

From dbscript Online Help
Jump to: navigation, search
 
Line 2: Line 2:
  
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
|-
+
|- valign="top"
 
| '''View
 
| '''View
 
| Production.vProductAndDescription
 
| Production.vProductAndDescription
Line 8: Line 8:
 
| '''Description
 
| '''Description
 
| Product names and descriptions. Product descriptions are provided in multiple languages.
 
| Product names and descriptions. Product descriptions are provided in multiple languages.
|-
 
 
|}
 
|}
 
  
 
=== Source ===
 
=== Source ===
Line 40: Line 38:
 
| '''Referenced Object
 
| '''Referenced Object
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| Table
 
| Table
 
| [[Production.Product_(table)|Production.Product]]
 
| [[Production.Product_(table)|Production.Product]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| Table
 
| Table
 
| [[Production.ProductDescription_(table)|Production.ProductDescription]]
 
| [[Production.ProductDescription_(table)|Production.ProductDescription]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| Table
 
| Table
 
| [[Production.ProductModel_(table)|Production.ProductModel]]
 
| [[Production.ProductModel_(table)|Production.ProductModel]]
  
|-
+
|- valign="top"
 
| Select
 
| Select
 
| Table
 
| Table
 
| [[Production.ProductModelProductDescriptionCulture_(table)|Production.ProductModelProductDescriptionCulture]]
 
| [[Production.ProductModelProductDescriptionCulture_(table)|Production.ProductModelProductDescriptionCulture]]
  
|-
+
|- valign="top"
 
| Schema
 
| Schema
 
| Schema
 
| Schema

Latest revision as of 23:17, 23 June 2010

wikibot[edit]

View Production.vProductAndDescription
Description Product names and descriptions. Product descriptions are provided in multiple languages.

Source[edit]

CREATE VIEW [Production].[vProductAndDescription] 
WITH SCHEMABINDING 
AS 
-- View (indexed or standard) to display products and product descriptions by language.
SELECT 
    p.[ProductID] 
    ,p.[Name] 
    ,pm.[Name] AS [ProductModel] 
    ,pmx.[CultureID] 
    ,pd.[Description] 
FROM [Production].[Product] p 
    INNER JOIN [Production].[ProductModel] pm 
    ON p.[ProductModelID] = pm.[ProductModelID] 
    INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx 
    ON pm.[ProductModelID] = pmx.[ProductModelID] 
    INNER JOIN [Production].[ProductDescription] pd 
    ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];

References[edit]

Dependency Type Object Type Referenced Object
Select Table Production.Product
Select Table Production.ProductDescription
Select Table Production.ProductModel
Select Table Production.ProductModelProductDescriptionCulture
Schema Schema Production


automatically generated[edit]

view Production.vProductAndDescription
Description Product names and descriptions. Product descriptions are provided in multiple languages.

CREATE VIEW [Production].[vProductAndDescription] 
WITH SCHEMABINDING 
AS 
-- View (indexed or standard) to display products and product descriptions by language.
SELECT 
    p.[ProductID] 
    ,p.[Name] 
    ,pm.[Name] AS [ProductModel] 
    ,pmx.[CultureID] 
    ,pd.[Description] 
FROM [Production].[Product] p 
    INNER JOIN [Production].[ProductModel] pm 
    ON p.[ProductModelID] = pm.[ProductModelID] 
    INNER JOIN [Production].[ProductModelProductDescriptionCulture] pmx 
    ON pm.[ProductModelID] = pmx.[ProductModelID] 
    INNER JOIN [Production].[ProductDescription] pd 
    ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];


Dependency Type Object Type Referenced Object
Select Table Production.Product
Select Table Production.ProductDescription
Select Table Production.ProductModel
Select Table Production.ProductModelProductDescriptionCulture
Schema Schema Production