## Using an SQL query that was designed elsewhere

1. Copy the SQL statement to the Windows Clipboard.

   Most SQL editors allow the SQL statement to be copied to the Clipboard by using the Ctrl-C key combination.

2. From the Start menu, select Programs, select Seagate Crystal Reports, then click Crystal SQL Designer.
3. On the File menu, click New.

   The New Query dialog box appears.

4. Click `Enter SQL Statement`.

   The Log On Server dialog box appears.

5. Select the Server Type, then click OK.

   The SQL Server Login dialog box appears.

6. Enter your user ID and password to log on to the SQL server, and click OK.

   A message appears indicating the success of your log on.

7. Click OK.

   The Enter SQL Statement dialog box appears.

8. Enter the SQL statement in the SQL area. Click anywhere inside the box to place an insertion point.
9. Press Ctrl-V or click Paste to paste the SQL statement into the SQL area.

   From within the SQL area you can make changes to the SQL statement. If needed, you can even delete the statement, and create a new one.

10. Click OK.

    The Crystal SQL Designer dialog box appears.

11. Click Yes to process the query.
12. On the File menu, click Save to save the new query.

The old SQL statement becomes a new SQL query that can be used with Seagate Crystal Reports just like any other SQL query file.

Alternatively, you can import a SQL statement saved in an ASCII text file. To do so, follow Steps 2 through 6 to open the Enter SQL Statement dialog box and log on to the ODBC data source, then click Import to import the SQL statement from the text file.

Seagate Software, Inc. http://www.seagatesoftware.com Please send comments to: techpubs@seagatesoftware.com