view icon View: vStoreWithDemographics

Properties

Property Value
Name vStoreWithDemographics
ID 2027154267
Schema Sales
Owner dbo
Encrypted false
Schema Bound false
With Check Option false
ANSI NULLS true
Uses Quoted Identifier true
Has Opaque Metadata false
Published false
Schema Published false
Replicated false
Has Replication Filter false
Has Unchecked Assembly Data false
Date Correlation View false
Uses Database Collation false
Tracked by CDC false
MS Shipped false
Modify Date 8/8/2010 5:23:46 PM
Create Date 8/8/2010 5:23:46 PM

Extended Properties

Name Value
MS_Description Stores (including demographics) that sell Adventure Works Cycles products to consumers.

View Columns

Column Name Datatype Nullable Is Identity
BusinessEntityID int false false
Name Name false false
AnnualSales money true false
AnnualRevenue money true false
BankName nvarchar(50) true false
BusinessType nvarchar(5) true false
YearOpened int true false
Specialty nvarchar(50) true false
SquareFeet int true false
Brands nvarchar(30) true false
Internet nvarchar(30) true false
NumberEmployees int true false

Indexes

No view indexes defined.

Object Level Permissions

No object level permissions defined.

Column Level Permissions

No explicit column permissions granted to this object

Objects that depend on [vStoreWithDemographics]

Objects on which [vStoreWithDemographics] depends

SQL

Script
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE VIEW [Sales].[vStoreWithDemographics] AS SELECT s.[BusinessEntityID] ,s.[Name] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/AnnualSales)[1]', 'money') AS [AnnualSales] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/AnnualRevenue)[1]', 'money') AS [AnnualRevenue] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/BankName)[1]', 'nvarchar(50)') AS [BankName] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/BusinessType)[1]', 'nvarchar(5)') AS [BusinessType] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/YearOpened)[1]', 'integer') AS [YearOpened] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/Specialty)[1]', 'nvarchar(50)') AS [Specialty] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/SquareFeet)[1]', 'integer') AS [SquareFeet] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/Brands)[1]', 'nvarchar(30)') AS [Brands] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/Internet)[1]', 'nvarchar(30)') AS [Internet] ,s.[Demographics].value('declare default element namespace "http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey"; (/StoreSurvey/NumberEmployees)[1]', 'integer') AS [NumberEmployees] FROM [Sales].[Store] s;
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Stores (including demographics) that sell Adventure Works Cycles products to consumers.' , @level0type=N'SCHEMA',@level0name=N'Sales', @level1type=N'VIEW',@level1name=N'vStoreWithDemographics'

See also

List of Views