How to run a query

The Entrance toolbar provides buttons for creating or opening SQL queries and running them:

New, Open, Save, and Save As work with query files as you would expect, and you can also open queries by double clicking them in the explorer tree.  (Running the IDE version on a Macintosh, you can also open SQL files from the Terminal command line using "open (filename)" or by double clicking them in Finder)
Use "Run" to run the current SQL script.  Any text results are placed on  the "Results" and any graphics results on the "Charts" tabs.  Click on the tabs below the output to switch between  views of SQL, Results, or Charts:

The results tab is guaranteed to contain only text.  We do it that way so that the Results tab matches what is placed on the clipboard by Edit | "Copy for spreadsheet...".  More about that in another section.
Stopping queries
Entrance supports running SQL scripts concurrently. YThis means you can start a time-consuming script in 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 mainly useful when you want to add titles above output, or comments below it. 
Place the report keyword before a SELECT, as in this example;
        TITLE "Gross Sales"
        TITLE "Period ending 6/30/07"
        TITLE ""
        COMMENT "This will go below the results"
    SELECT Item, Price, Count, Revenue from SalesJournal;
Adding query folders
The folders you see in an Entrance explorer tree are file directories.  You can add new ones using File | Add file folders... 
This feature is particularly useful if you have obtained the sample scripts for the MySQL Cookbook  by Paul Dubois or another book like it.  Unzip the samples into a directory, add the directory to the Entrance tree  and you have quick access to the samples.  You can also copy and paste SQL snippets from the samples into your own scripts using the SQL editor's advanced support for copy and "Paste from ring...".

Please note:  This web page and other Entrance documentation web pages are copyrighted material and have not been released under the terms of the GPL.
Copyright (c) 2007, 2008 dbEntrance Software, All Rights Reserved                       
Java and the Java Coffee Cup Logo are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries.  Solaris is a trademark of Sun Microsystems, Inc.  MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries.  Windows is a trademark of Microsoft Corporation.  Macintosh is a trademark of Apple Computer, Inc.