Examples |
To practice with the examples in this chapter, you will need to use the sample data library that is provided with the SQL Query Window.
Submit the following statement in the Program Editor to assign the SAMPLE libref to the sample library:
libname sample 'sample library';
Consult your on-site SAS support personnel for the location of the sample library. Some of the examples require that you save files to the sample library. If you do not have write access to the sample library, you can save the files to another library of your choice, such as the SASUSER library.
Invoking the Query Window |
For these examples, invoke the SQL Query Window by selecting Tools Query or by entering query in the command window or at the Command ===> prompt.
The SQL QUERY TABLES window appears. By default, the SASUSER libref is selected and the tables from that libref appear in the Available Tables list.
Changing Your Profile |
In order to include the tables that are in the sample library in the Available Tables list, you must set your SQL Query Window profile to include the tables in the SAMPLE library. Select Profile Set Preferences.
Select the right arrow next to Data Restrictions to display the Data Restrictions for Profile window.
Select SAMPLE from the Table Source list. Select Add entire Table Source to preferences from the pop-up menu that appears.
Select WORK from the Table Source list. Select Add entire Table Source to preferences from the pop-up menu.
Note: If you do not have write access to the SAMPLE library, then repeat the previous step for the SASUSER library.
Select
to return to the Preference Settings for Profile window. to save your new profile setting.Type SAMPLE in the Entry Name field of the Name Catalog Entry for Profile window. Select .
Select
in the Preference Settings for Profile window.From the SQL QUERY TABLES window, select Tools Switch to New Profile.
Select the right arrow next to the Profile Name field to display a list of profiles.
In the Preference Profiles in Catalog window, select SASUSER from the Libraries list. Next, select PROFILE from the Catalogs list, and then select SAMPLE from the Profiles list. Select .
Select
to return to the SQL QUERY TABLES window and to complete the switch to the new profile. The new profile displays only the tables that are in the sample library.See Setting Your Profile for more information about the SQL Query Window user profile.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.