Created
August 11, 2019 01:20
-
-
Save bifacil/c9f418785c2815dfafc237b6ed7a0dd9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- "Good code is its own best documentation." - Steve McConnell | |
LOAD dwh.DimProducts WITH SCD1 | |
SELECT | |
#ProductID, | |
Product.Name Product, | |
ProductCategory.name ProductCategory, | |
ProductSubCategory.name ProductSubCategory, | |
ProductNumber, | |
ProductModel.name ProductModel, | |
Color, | |
StandardCost, | |
ListPrice, | |
Size, | |
SizeUnitMeasureCode, | |
Weight, | |
WeightUnitMeasureCode, | |
ProductLine, | |
DiscontinuedDate, | |
MakeFlag, | |
FinishedGoodsFlag | |
FROM staging.Product | |
LEFT JOIN staging.ProductSubCategory USING ProductSubcategoryID | |
LEFT JOIN staging.ProductCategory USING ProductSubCategory(ProductCategoryId) | |
LEFT JOIN staging.ProductModel USING ProductModelID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment