Saving Queries

After creating and running your query you have a choice as to whether or not to save this query for future use. Queries can be saved in either the database or in a disk file.

To save a query, select SQL > Save Query. See Loading and Saving Queries for more information.

Saving a Query Builder report as an SQL report

Sometimes you may want to convert a Query Builder report to SQL. This may be to access the increased functionality of SQL or to schedule the report for automated running. The following steps allow this conversion without having to re-design the layout:
  1. Export the QB report somewhere (for example, My Documents). This will create two files: [QB report].QRY and [QB report].MKR
  2. Open the QB report in Query Builder and select SQL > View SQL or click the spectacles icon.
  3. Click Save SQL and navigate to where you saved the QB query and give it a different report name: [SQL report].SQL
  4. In Query Builder select SQL > Query Info or click on the iQ icon and copy and save this text. Close Query Builder.
  5. Open the folder where the files are and open [SQL report].SQL in Notepad. At the beginning, insert a new line and type /**/.
  6. Paste the query info between the asterisks: /*This is the query info.*/ and save your changes
  7. Copy [QB report].MKR. Rename the copy the same as the .SQL file but with the extension .MKR: [SQL report].MKR.
  8. Use Communicare to import the SQL report.
Note: If the Query Builder report has parameters, open the report in the SQL editor and change $Parameter_name to :Parameter_name.

Caution: