Customizing Your Session and Using Advanced Features |
When you save a query, references in the query to tables are saved as two-level names (libref.filename). If you try to include a saved query that specifies a libref that is not currently assigned, or tables that have been moved or deleted, then the SQL Query Window will inform you that the tables cannot be found.
If the tables are available in another library, or if you want to run the query against different tables, then select
. The Include Query Tablename Edit window appears (probably with different names than in this example).If the tables exist in another library, then select that library from the Table Sources list, and then select the tables from the Available Tables list.
If you want to run the query against different tables, then select the library that contains the tables from the Table Sources list, then select the tables from the Available Tables list. The tables must have identical structures to the tables on which the query was built.
This feature enables you to create a query that can be used on any identically structured table. For example, you could create a query on a table containing March sales data, and then use that query on a table containing April sales data. Remember that, to be prompted for a new table for the query, the original table on which the query was created must not be available in the SQL Query Window session. By moving the March table from, for example, the CUR_MON (Current Month) library, and moving the April table into the CUR_MON library, you would be prompted to supply the table for the query.
See Saving Queries for more information about creating and saving queries.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.