Execute a Query Against a Database

You can run your query against a database catalog. To do this, you connect to the database from the Query Tool and then execute your query.

Follow this process to run a query against a database:

  • Open the Query Tool from the Tools tab.
  • Create a new query or open an existing query (*.qry or *.sql) file.
  • Click the Connect ODBC_Connect_Database icon on the toolbar.
  • Enter the database-specific connection criteria in the Connect dialog.
  • (Optional) Select the Restrict row count to check box and enter a number to limit the number of rows returned.
  • Click the Execute ODBC_Execute icon on the toolbar.

After your query executes, the results display in the Results box. Use other features in the Query Tool to save the query or save your result set.

Note: You cannot be connected to erwin ODBC and a database at the same time in the Query Tool. If you are connected to erwin ODBC, the (database) Connect icon is dimmed. Click the Disconnect ODBC_Disconnect icon on the toolbar to disconnect your erwin ODBC connection before you attempt to connect to a database. Also, before you can make a database connection, the appropriate database client software must be installed. See Database Connection Overview for more information.