Save a Data Query as a New Data Query

Open an existing data query from the SAS Folders tree that closely matches the data query that you want to create. Click Save query as, and then enter a new name and select a location. Perform any customizations.
In many cases, you want to use the same input tables, joins, and so on, but you want a different output table. In this case, click Clear on the Outputs tab, and then specify new output table information. This step ensures that you use a different output table for the copied data query.
Note: If you change only the name of the output table in the copied data query, then the name of the original output table in the original data query is also changed.
For example, an analyst creates a data query that summarizes sales data and includes several geographic regions. The data query is saved with an output table that is named Sales. A regional sales manager wants to perform a similar summarization, but he wants to filter the data for a single geographic region. In this case, the regional sales manager performs the following steps:
  1. Opens the analyst's data query, and clicks Save query as to save a copy of the data query with a new name.
  2. Filters the data on the Where or Having tab for the geographic region.
  3. Clicks Clear on the Outputs tab, and then specifies new output table information. This ensures that the original output table, Sales, for the original data query is not overwritten.
  4. Saves and runs the copied data query.

See Also