- Data Analysis and Business Modeling with Excel 2013
- David Rojas
- 509字
- 2021-07-09 21:35:22
Reading multiple tables from MSSQL
In this section, you will learn how to read multiple tables. In practice, the data that you will need will span multiple tables and is usually not found in a single table. We will import the following tables:
Users: This table holds information about all of the home owners who want to rent their homes. Data, such as their name, address, phone number, and registration date, will be found in this table.
PmtHistory: This table captures the data after a user applies to a rental property. It includes information, such as the date the application was submitted and the ID number of the property.
Rateplan: This table contains information on how much it costs the owner of the rental property to process an application.
- We already know from the Reading a table from MSSQL – the Microsoft SQL Server database section how to import a single table, and we will repeat a lot of these steps but with a few differences. Make sure that you close Excel and open a new workbook. Select the DATA tab, click on the From Other Sources button, and select the From SQL Server option, as shown in Figure 2.1 of the Reading a table from MSSQL – the Microsoft SQL Server database section.
- Type the name of your server and click on the Next button, as shown in Figure 2.3 of the Reading a table from MSSQL – the Microsoft SQL Server database section. If you do not know the name of your server, refer to the Reading a table from MSSQL – the Microsoft SQL Server database section for more information.
- In the Data Connection Wizard, make sure that you select the Connect to a specific table and the Enable selection of multiple tables options.
Figure 2.7
- Now, select the database that holds the tables named users, pmthistory, and rateplan by using the drop-down menu. In this example, the database is called BizIntel, and we select this option.
Figure 2.8
After selecting the database, you will see the users, pmthistory, and rateplan tables appear in the middle of the dialog box. Do not worry about the fourth table that shows up, which is named data. This is just an additional table that we can import into Excel if we choose to do so.
- Select the three tables named users, pmthistory, and rateplan, as shown in the following screenshot. This action tells Excel that you want to import these specific tables. You have the option of choosing one or more tables in this step.
Figure 2.9
- You will now see the Import Data dialog box with the PivotTable Report option selected by default. Select the Table option and click on the OK button, as shown in the following screenshot:
Figure 2.10
After you click on the OK button, each table will be placed in a separate sheet. The sheets 2, 3, and 4 will contain the data in the tables named users, pmthistory, and rateplan. That's it! You have just completed the Reading multiple tables from MSSQL section.
- Android Wearable Programming
- 程序員面試筆試寶典(第3版)
- Mastering Entity Framework
- Machine Learning with R Cookbook(Second Edition)
- 從程序員到架構(gòu)師:大數(shù)據(jù)量、緩存、高并發(fā)、微服務(wù)、多團隊協(xié)同等核心場景實戰(zhàn)
- 青少年美育趣味課堂:XMind思維導(dǎo)圖制作
- Cassandra Design Patterns(Second Edition)
- YARN Essentials
- 面向?qū)ο蟪绦蛟O(shè)計(Java版)
- 21天學(xué)通C++(第5版)
- Arduino Wearable Projects
- Struts 2.x權(quán)威指南
- UML基礎(chǔ)與Rose建模實用教程(第三版)
- Learning D3.js 5 Mapping(Second Edition)
- JBoss AS 7 Development