Use the Export SQL command to export the SQL statement for your query. The file is saved in an SQL format.
To export SQL:
Select File, then Export, and then SQL.
The Export SQL File dialog box is displayed.
Specify the file name and location and click Save.