Getting to know your data in SQL Server
For the purposes of this book, we will be focusing on Excel 2016. To learn more about where to purchase and/or download the latest version of Microsoft Excel, visit the following website: https://products.office.com/en-US/.
Working through the tables that we have inside our SQL Server database can be a bit of a daunting task. There are over 60 tables in the AdventureWorks2014 database, with the majority of them being dimensional or lookup tables, such as [Person].[CountryRegion]
, as seen in the following screenshot:
The previous table is basically a lookup for country names associated with a specific code. The next step would be to identify a table to function as the fact table within this schema. That table would be [AdventureWorks2014].[Sales].[SalesOrderHeader]
.
To see all the columns in the table, run the following script:
SELECT * FROM [AdventureWorks2014].[Sales].[SalesOrderHeader]
As can be seen from the result set, there are several...