Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SELECT sc.customerID, pp.FirstName, pp.LastName, pc.Name AS CountryName,
- --pc.CountryRegionCode AS CountryCode, ps.StateProvinceCode AS Region
- --INTO DIMIndividualCustomer
- --FROM AdventureWorks2012.Sales.Customer AS sc
- -- INNER JOIN AdventureWorks2012.Person.Person AS pp ON sc.PersonID = pp.BusinessEntityID
- -- INNER JOIN AdventureWorks2012.Person.BusinessEntityAddress AS pb ON pp.BusinessEntityID = pb.BusinessEntityID
- -- INNER JOIN AdventureWorks2012.Person.Address AS pa ON pa.AddressID = pb.AddressID
- -- INNER JOIN AdventureWorks2012.Person.StateProvince AS ps ON pa.StateProvinceID = ps.StateProvinceID
- -- INNER JOIN AdventureWorks2012.Person.CountryRegion AS pc ON ps.CountryRegionCode = pc.CountryRegionCode;
- --SELECT sc.customerID, pc.Name AS CountryName,
- --pc.CountryRegionCode AS CountryCode, ps.StateProvinceCode AS Region
- --INTO DIMStoreCustomer
- --FROM AdventureWorks2012.Sales.Customer AS sc
- -- INNER JOIN AdventureWorks2012.Person.Person AS pp ON sc.PersonID = pp.BusinessEntityID
- -- INNER JOIN AdventureWorks2012.Person.BusinessEntityAddress AS pb ON pp.BusinessEntityID = pb.BusinessEntityID
- -- INNER JOIN AdventureWorks2012.Person.Address AS pa ON pa.AddressID = pb.AddressID
- -- INNER JOIN AdventureWorks2012.Person.StateProvince AS ps ON pa.StateProvinceID = ps.StateProvinceID
- -- INNER JOIN AdventureWorks2012.Person.CountryRegion AS pc ON ps.CountryRegionCode = pc.CountryRegionCode;
- --SELECT pp.Name AS Name, pp.ProductID AS ProductId, pp.ListPrice AS ListPrice, pp.Color AS Color, pp.Size AS Size, pp.Weight AS Weight,
- -- pp.MakeFlag AS IsManufactures, pp.FinishedGoodsFlag AS IsSalable, ppc.Name AS Category, pps.Name AS Subcategory
- --INTO DIMSProduct
- --FROM AdventureWorks2012.Production.Product AS pp
- -- INNER JOIN AdventureWorks2012.Production.ProductSubcategory AS pps ON pps.ProductSubcategoryID = pp.ProductSubcategoryID
- -- INNER JOIN AdventureWorks2012.Production.ProductCategory As ppc ON pps.ProductCategoryID = pps.ProductCategoryID;
- SELECT pp.BusinessEntityID AS SalesPersonId, pp.FirstName AS FirstName, pp.LastName AS pp.LastName,
- -- salespersonid, firstname, lastname, title, gender, countrycode, region
- INTO DIMSalesPerson
- FROM AdventureWorks2012.Sales.SalesPerson AS ssp
- INNER JOIN AdventureWorks2012.Person.Person AS pp ON pp.BusinessEntityID = ssp.BusinessEntityID
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement