ODBC Data Query – Finish

This is the final menu of the ODBC Data Query wizard. This lets you complete the ODBC query, and save the resulting SQL query in a Genstat Stored ODBC retrieval (extension .GDB). Before running the generated query, there is the option of editing the SQL text to make the retrieval more general, for example adding joins to other database tables.

Run the SQL Query

Runs the specified SQL query on the ODBC table, generating a spreadsheet or set of data in the server if using the Data Load menu when clicking the Finish button.

View or edit the SQL Query

Prompts you with a new menu which lets you examine or edit the SQL statement before running the query on the ODBC table. Selecting this option will result in the ODBC: View or Edit SQL Statement window popping up before the database query is run. This allows you to edit and add to the SQL query generated by selecting a set of columns from a single table. For example if you wanted data from the resulting INNER JOIN of two tables, you could add in the SQL code to select columns from a second table joined to the first one you had selected. You can also specify other SQL options such as SORTED BY and WHERE etc.

Save the SQL Query, but do not run the Query

Lets you save the data query in a GDB file, without running it in Genstat. You can specify the name of the file in the space provided. 

View and save the SQL Query, but do not run the Query

Lets you view and save the data query in a GDB file, without running it in Genstat. You can specify the name of the file in the space provided.

Save the Query when successfully completed in a GDB file

Lets you save the data query in a GDB file, so that it can be run on the ODBC server on other occasions. You can specify the name of the file in the space provided. Alternatively, you can locate the file using the Browse button.

Add to book

This lists all open books within Genstat. Select the book that the new sheet will be added to. If the data are to appear in a new book then select the New book setting.

Set as active sheet

Sets the resulting spreadsheet as the active spreadsheet for the Genstat session.

Expected number of rows

This sets the memory allocation to the specified number of rows. For large retrievals, if you know how many rows the query will return, setting this value optimizes the memory management. If this value is unset, Genstat allocates a moderate amount of memory and then attempts to expand this if it is exhausted. Using this incremental memory allocation for large retrievals is more likely to fail than allocating one large block of memory using the specified number or rows at the outset.

Back

Go back to the ODBC Data Query – Filter Data Using Where Statement dialog.

Finish

Runs the query and retrieves the data into Genstat.

Cancel

Exit without running the ODBC Query.

See also

ODBC Data Query – Select Data
ODBC Data Query – Filter Data Using Where Statement
ODBC: View or Edit SQL Statement
ODBC Insert Table/Column Name
ODBC Databases
SQL Statements
Spreadsheet New Menu
Using ODBC with 64bit Windows
DBIMPORT procedure
DBEXPORT procedure

Updated on July 24, 2019

Was this article helpful?