Running Queries



The Entrance toolbar provides buttons for creating or opening SQL scripts and running them.   You can also make charts and format table output using the PLOT and REPORT extension keywords.

Use the "New" button to make a new, blank SQL script and "Open" to open an existing file..   Use "Run" to run scripts.   The folder currently selected in the Entrance explorer tree is the default for saving "Untitled" scripts or using "Save as...".

By default, Entrance places text and graphics on a "Results" tab and error messages on the "Messages" tab.   From the table popup you can save the results as a web page or export its charts and tables individually. You can also save a web page using File | Save as HTML.

Use "Copy table as HTML..." to move results into an HTML editor like Wordpress, and use "Copy table as tabbed..." to move results into a spreadsheet.

Stopping queries

Entrance supports running SQL scripts concurrently. This means you can start a time-consuming script on one tab and let it run while you edit scripts on others. You switch between tabs by clicking on the tabs under the toolbar.

To stop a script, first click its tab to bring it to the top of the others, then click the "Stop" button on the toolbar.

Customizing results

Text output in the Results tab can be customized using the REPORT keyword. This is useful when you want to add titles above output, or comments below it. Place the report keyword before a SELECT, as in this example;
 
    REPORT
        TITLE "Gross Sales"
        TITLE "Period ending 6/30/07"
        TITLE ""
        COMMENT "This will go below the results"
    SELECT Item, Price, Count, Revenue from SalesJournal;
 
   
Refer to the Help menu for more details about the REPORT keyword.

Adding query folders

The folders in an Entrance explorer tree are file directories. You can add new ones using File | Add file folders...