Skip to content

Instantly share code, notes, and snippets.

@bifacil
Last active August 11, 2019 01:25
Show Gist options
  • Save bifacil/3865b32100107737db5875274dc34a4c to your computer and use it in GitHub Desktop.
Save bifacil/3865b32100107737db5875274dc34a4c to your computer and use it in GitHub Desktop.
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 ON Product.ProductSubcategoryID=ProductSubCategory.ProductSubcategoryID
LEFT JOIN staging.ProductCategory ON ProductSubCategory.ProductCategoryId=ProductCategory.ProductCategoryId
LEFT JOIN staging.ProductModel ON Product.ProductModelID=ProductModel.ProductModelID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment