To Test SQL Queries

To access this function click on Testing > SQL Queries. The SQL Query Window displays.


The Execute option tests SQL statements so you can see results before executing the statement in code. The same screen is also used to preserve and recall the statements from SQL History. This utility can also be used to undo updates, check results, delete values or even adding and dropping tables. Any SQL command entered here is submitted to the ODBC driver for execution. There are no limitations by RFgen as to what can be submitted. For more information, see SQL Query Tips below.

The Options > Export to Excel utility will prompt for a location to save an Excel file. Microsoft Excel does not need to be installed on the system for this function to work.

The Options > Maximum Rows: 1000 utility allows you to change the 1000 maximum row default to a different row value.

The Options > Use ERP Connection function allows you to enable a connection to a specific ERP which simplifies the process of executing a SQL statement against an ERP connection such as SAP, Oracle JDE, Oracle EBS, Deltek CostPoint, or Microsoft Dynamics.  You slide the box over to enable or disable the connection.

To test the query, enable the ERP mode (slide box to the right), enter your statement in the query box and press Execute.  The execution will display results in the second box.

SQL Query Tips

The SQL Query Window gives a current snapshot of the data in your database. As transactions are applied against your data, you will need to re-execute your SQL statement.

If the intent is “select * from TableName”, then only specifying the table name will default to the “select * from” when executed.

The multi-line text box allows the entry of several SQL statements. In this case, highlight the intended SQL statement and click Execute from the menu.

Multiple SQL statements must be separated by semi-colons “;” . For example:

Select * from items;

Select * from itemmaster;

These will be considered two different SQL statements. If no text is highlighted, then it will look at the current insertion point to determine with SQL statement to execute based upon semi-colon delimiters. Further, if you click on Options menu / Display Query History – then double-click on an item, it will append it to the SQL window instead of replacing the existing contents.

The SQL History option allows you to select from any of the previously executed SQL commands and to also limit the output to a maximum number of records.