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

From dbscript Online Help
Jump to: navigation, search
 
(2 intermediate revisions by the same user not shown)
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
|-
+
|- valign="top"
 +
| '''Description
 +
| Product names and descriptions. Product descriptions are provided in multiple languages.
 
|}
 
|}
  
 +
=== Source ===
 
<pre>
 
<pre>
 
CREATE VIEW [Production].[vProductAndDescription]  
 
CREATE VIEW [Production].[vProductAndDescription]  
Line 27: Line 30:
 
     ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];
 
     ON pmx.[ProductDescriptionID] = pd.[ProductDescriptionID];
 
</pre>
 
</pre>
 +
 +
=== References ===
 +
{| border="1" cellpadding="5" cellspacing="0" style="border-collapse:collapse"
 +
|- style="background:silver"
 +
| '''Dependency Type
 +
| '''Object Type
 +
| '''Referenced Object
 +
 +
|- valign="top"
 +
| Select
 +
| Table
 +
| [[Production.Product_(table)|Production.Product]]
 +
 +
|- valign="top"
 +
| Select
 +
| Table
 +
| [[Production.ProductDescription_(table)|Production.ProductDescription]]
 +
 +
|- valign="top"
 +
| Select
 +
| Table
 +
| [[Production.ProductModel_(table)|Production.ProductModel]]
 +
 +
|- valign="top"
 +
| Select
 +
| Table
 +
| [[Production.ProductModelProductDescriptionCulture_(table)|Production.ProductModelProductDescriptionCulture]]
 +
 +
|- valign="top"
 +
| Schema
 +
| Schema
 +
| [[Production_(schema)|Production]]
 +
 +
|}
 +
 +
 
== automatically generated ==
 
== automatically generated ==
  

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