Вы находитесь на странице: 1из 2

-- ================================================

-- NEU INFO7290 DW Course


-- Samples used for workshops & assignments
-- ================================================
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- ================================================
-- Author:
Rick Sherman
-- Create date: 1/26/2012
-- Description: Create Tables for Workshop 1
-- ================================================
--USE [NEU-DW]
--GO

-- or use other database name

-- -------------------------------------------------- Update Table DimProduct


-- ------------------------------------------------update [dbo].[DimProduct]
set ProductSubcategoryKey = -1
where ProductSubcategoryKey is null
;
-- -------------------------------------------------- Insert Unkmown into Table DimProductCategory
-- ------------------------------------------------INSERT INTO [neu-dw].[dbo].[DimProductCategory]
([ProductCategoryKey]
,[ProductCategoryAlternateKey]
,[EnglishProductCategoryName]
,[SpanishProductCategoryName]
,[FrenchProductCategoryName])
VALUES
(-1
,-1
,'Unknown'
,'Desconocido'
,'Inconnu'
)
GO
-- -------------------------------------------------- Insert Unkmown into Table DimProductSubCategory
-- ------------------------------------------------INSERT INTO [neu-dw].[dbo].[DimProductSubcategory]
([ProductSubcategoryKey]
,[ProductSubcategoryAlternateKey]
,[EnglishProductSubcategoryName]
,[SpanishProductSubcategoryName]
,[FrenchProductSubcategoryName]
,[ProductCategoryKey])
VALUES
(-1

,-1
,'Unknown'
,'Desconocido'
,'Inconnu'
,-1
)
GO

Вам также может понравиться