You might need to join tables to accomplish the following: create a report with columns from more than one table compute a new column when the input columns are located in separate tables add information from a lookup table into a base table identify column values that do or do not occur in other tables Select Add Tables to include additional tables in the query. The Query Builder attempts to join tables by columns that have the same name and type. If no column name and type matches are found, then a warning message tells you to join the columns manually. To prevent SAS Enterprise Guide from attempting to join tables by matching columns, select Tools Options Query and clear the Automatically attempt to join tables in query check box. To learn more about the join types, select Help in the Tables and Joins window, and then select Understanding the types of joins. Joining Tables In a previous products with total profits exceeding $500 were identified. Analysts asked for more details about these top products, including the product category, the product, supplier, and country name. To include the necessary columns, use the Query Builder to join the TopProducts SAS table with the products SAS table and the country_lookup Excel spreadsheet. In the Chapter4 project, add the TopProducts and Products SAS data sets and the country_lookup Excel file to the project. The Import Data task opens to import the country_lookup Excel file. Name the imported table country_lookup and select the First row of range contains field names check box. Do not make any changes to the field attributes. In the process flow, hold down the Ctrl key and select TopProducts, Products, and Data Imported from country_lookup. one of the three tables and select Query Builder.
You might need to join tables to accomplish the following: create a report with columns from more than one table compute a new column when the input columns are located in separate tables add information from a lookup table into a base table identify column values that do or do not occur in other tables Select Add Tables to include additional tables in the query. The Query Builder attempts to join tables by columns that have the same name and type. If no column name and type matches are found, then a warning message tells you to join the columns manually. To prevent SAS Enterprise Guide from attempting to join tables by matching columns, select Tools Options Query and clear the Automatically attempt to join tables in query check box. To learn more about the join types, select Help in the Tables and Joins window, and then select Understanding the types of joins. Joining Tables In a previous products with total profits exceeding $500 were identified. Analysts asked for more details about these top products, including the product category, the product, supplier, and country name. To include the necessary columns, use the Query Builder to join the TopProducts SAS table with the products SAS table and the country_lookup Excel spreadsheet. In the Chapter4 project, add the TopProducts and Products SAS data sets and the country_lookup Excel file to the project. The Import Data task opens to import the country_lookup Excel file. Name the imported table country_lookup and select the First row of range contains field names check box. Do not make any changes to the field attributes. In the process flow, hold down the Ctrl key and select TopProducts, Products, and Data Imported from country_lookup. one of the three tables and select Query Builder.